Kaynağa Gözat

Don't wait for bashrc

Bob Mottram 8 yıl önce
ebeveyn
işleme
09bac71090
No account linked to committer's email
1 değiştirilmiş dosya ile 7 ekleme ve 1 silme
  1. 7
    1
      src/freedombone

+ 7
- 1
src/freedombone Dosyayı Görüntüle

@@ -6345,9 +6345,11 @@ function install_gogs {
6345 6345
 
6346 6346
     # install Go
6347 6347
     apt-get -y install golang libpam0g-dev
6348
+    export GOPATH=/home/git/go
6348 6349
     if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
6349 6350
         echo 'export GOPATH=/home/git/go' >> ~/.bashrc
6350
-	fi
6351
+    fi
6352
+    systemctl set-environment GOPATH=/home/git/go
6351 6353
     if ! grep -q "systemctl set-environment GOPATH=/home/git/go" ~/.bashrc; then
6352 6354
         echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
6353 6355
     fi
@@ -10085,8 +10087,12 @@ function install_ipfs {
10085 10087
         adduser --disabled-login --gecos 'Gogs' git
10086 10088
 
10087 10089
         # install Go
10090
+        export GOPATH=/home/git/go
10088 10091
         if ! grep -q "export GOPATH=/home/git/go" ~/.bashrc; then
10089 10092
             echo 'export GOPATH=/home/git/go' >> ~/.bashrc
10093
+        fi
10094
+        systemctl set-environment GOPATH=/home/git/go
10095
+        if ! grep -q "systemctl set-environment GOPATH=/home/git/go" ~/.bashrc; then
10090 10096
             echo 'systemctl set-environment GOPATH=/home/git/go' >> ~/.bashrc
10091 10097
         fi
10092 10098
         export GOPATH=/home/git/go