Commit 2ae032a3 authored by James Coyle's avatar James Coyle

Now downloads and installs in one hit!

parent 2c26cd76
......@@ -6,10 +6,15 @@ DATA_DIR="/var/data/cockroachdb"
ETC="/etc/cockroachdb"
CERT_DIR="$ETC/certs"
CERT_PRIVATE_DIR="$CERT_DIR/private"
TMP=/tmp/cockroachdb.rgz
function usage {
printf "Cockroachdb Installer\nUsage: $1 /path/to/cockroachdb.tgz [user]\n"
echo "download cockroachdb tgz file from https://www.cockroachlabs.com"
# Not used but kept for doco
printf "Cockroachdb Installer\nUsage: $1 [user]\n"
}
function getBin{
wget -O $TMP https://binaries.cockroachdb.com/cockroach-latest.linux-amd64.tgz
}
function extractRoach {
......@@ -57,20 +62,19 @@ function outputConnectUtil {
## Begin processing script
if [ -z "$1" ]; then
usage $0
exit 1
fi
./systemdUninstaller.sh
echo "Installing..."
extractRoach $1
setInstallDirs $1
getBin
extractRoach $TMP
setInstallDirs $TMP
installCerts
changePerms $2
changePerms $1
installService
outputConnectUtil
rm $TMP
echo "Done!"
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment