Alter the go version used by gogs
This commit is contained in:
parent
22b90f4cab
commit
babd7b0f69
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue