Browse Source

Fixing gogs systemd environment

Bob Mottram 10 years ago
parent
commit
d62015c061
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/freedombone

+ 2
- 2
src/freedombone View File

@@ -6808,7 +6808,7 @@ quit" > $INSTALL_DIR/batch.sql
6808 6808
   sed -i 's|#After=mysqld.service|After=mysqld.service|g' /etc/systemd/system/gogs.service
6809 6809
   sed -i "s|WorkingDirectory=.*|WorkingDirectory=$GOPATH/src/github.com/gogits/gogs|g" /etc/systemd/system/gogs.service
6810 6810
   sed -i "s|ExecStart=.*|ExecStart=$GOPATH/src/github.com/gogits/gogs/gogs web|g" /etc/systemd/system/gogs.service
6811
-  sed -i "s|Environment.*|Environment=\"USER=git\",\"HOME=/home/git\",\"GOPATH=/home/git/go\"|g" /etc/systemd/system/gogs.service
6811
+  sed -i "s|Environment.*|Environment=\"USER=git\" \"HOME=/home/git\" \"GOPATH=/home/git/go\"|g" /etc/systemd/system/gogs.service
6812 6812
   systemctl enable gogs
6813 6813
   systemctl daemon-reload
6814 6814
   systemctl restart gogs
@@ -8463,7 +8463,7 @@ function create_upgrade_script {
8463 8463
       echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8464 8464
       echo 'chown -R git:git /home/git' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8465 8465
       echo 'chmod 600 /home/git/go/src/github.com/gogits/gogs/custom/conf/app.ini' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8466
-      echo 'GOPATH=/home/git/go' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8466
+      echo 'export GOPATH=/home/git/go' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8467 8467
       echo 'go build' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8468 8468
       echo 'systemctl restart gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8469 8469
       echo 'systemctl daemon-reload' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME