Skip to content

Instantly share code, notes, and snippets.

@NiklasRosenstein
Created April 19, 2017 20:11
Show Gist options
  • Save NiklasRosenstein/d77bb5ea94f627db8abbc2f1d9ca37cf to your computer and use it in GitHub Desktop.
Save NiklasRosenstein/d77bb5ea94f627db8abbc2f1d9ca37cf to your computer and use it in GitHub Desktop.
#!/bin/bash
VERSION=$1
if [ -z "$VERSION" ]; then
echo "no version specified"
exit 1
fi
.local/bin/nocrux gogs stop
wget https://dl.gogs.io/$VERSION/linux_amd64.tar.gz
mv gogs gogs_old
tar -zxvf linux_amd64.tar.gz
cp -R gogs_old/{custom,data,log} gogs
rm linux_amd64.tar.gz
.local/bin/nocrux gogs start
echo "Upgrade complete. Remove gogs_old/ manually!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment