Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
James Coyle
cockroach-deploy
Commits
53767c14
Commit
53767c14
authored
Jun 07, 2018
by
James Coyle
Browse files
Added upgrade script
parent
1f978566
Changes
1
Hide whitespace changes
Inline
Side-by-side
upgrade.sh
0 → 100644
View file @
53767c14
#!/bin/bash
APP_DIR
=
"/usr/local/bin"
TMP_DL
=
/tmp/cockroachdb.tgz
TMP
=
/tmp
set
-e
function
usage
{
# Not used but kept for doco
printf
"Cockroachdb Installer
\n
Usage:
$1
[user]
\n
"
}
function
getBin
{
wget
-O
$TMP_DL
https://binaries.cockroachdb.com/cockroach-latest.linux-amd64.tgz
}
function
extractRoach
{
mkdir
-p
"
$APP_DIR
"
||
exit
1
tar
-xzf
$TMP_DL
-C
$TMP
||
exit
1
}
function
setInstallDirs
{
mv
$TMP
/cockroach-latest
*
/cockroach
$APP_DIR
/cockroach
||
exit
1
rm
-rf
$TMP
/cockroach-latest
*
}
service cockroach stop
echo
"Upgrading..."
getBin
extractRoach
setInstallDirs
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment