Alter the go version used by gogs

This commit is contained in:
Bob Mottram 2016-09-29 17:22:16 +01:00
parent 22b90f4cab
commit babd7b0f69
1 changed files with 7 additions and 0 deletions

View File

@ -204,6 +204,13 @@ function upgrade_golang {
rootdir=
mesh_upgrade_golang
# alter the go version used by the gogs daemon
if [ -f /etc/systemd/system/gogs.service ]; then
sed -i "s|Environment=.*|Environment=\"USER=gogs\" \"HOME=/home/gogs\" \"GOPATH=/home/go/go${GO_VERSION}\"|g" /etc/systemd/system/gogs.service
systemctl daemon-reload
systemctl restart gogs
fi
echo "upgrade_golang:$GO_VERSION" >> $COMPLETION_FILE
}