Last active
August 29, 2015 14:16
-
-
Save qnub/1740a9a546bec9a8e4a6 to your computer and use it in GitHub Desktop.
GitLab Omnibus debian package update script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# example: sudo ./gitlab_up.sh package_filenaname.deb | |
# get it here https://about.gitlab.com/downloads/ (copy link to package without filename, it must be set through command line) | |
URL="https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/" | |
if [ ! $1 ]; | |
then | |
echo "Set downloadable .deb name!" | |
exit 1 | |
fi | |
echo "Downloading $1" | |
wget $URL$1 | |
echo "Stop unicorn and sidekiq" | |
gitlab-ctl stop unicorn | |
gitlab-ctl stop sidekiq | |
echo "Making backup" | |
gitlab-rake gitlab:backup:create | |
echo "Installing new GitLab" | |
dpkg -i $1 | |
echo "Updating GitLab" | |
gitlab-ctl reconfigure | |
echo "Up services" | |
gitlab-ctl restart | |
echo "GitLab updated" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment