GOPATH set as systemd environment variable

This commit is contained in:
Bob Mottram 2015-04-05 10:06:36 +01:00
parent 49a1c7bdc5
commit a5e4a59e14
1 changed files with 4 additions and 1 deletions

View File

@ -6715,7 +6715,10 @@ function install_gogs {
# install Go
apt-get -y install golang
if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
echo 'export GOPATH=/home/git/go' >> ~/.bashrc
echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
fi
. ~/.bashrc
export GOPATH=/home/git/go
if [ ! -d $GOPATH ]; then