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
   sed -i 's|#After=mysqld.service|After=mysqld.service|g' /etc/systemd/system/gogs.service
6808
   sed -i 's|#After=mysqld.service|After=mysqld.service|g' /etc/systemd/system/gogs.service
6809
   sed -i "s|WorkingDirectory=.*|WorkingDirectory=$GOPATH/src/github.com/gogits/gogs|g" /etc/systemd/system/gogs.service
6809
   sed -i "s|WorkingDirectory=.*|WorkingDirectory=$GOPATH/src/github.com/gogits/gogs|g" /etc/systemd/system/gogs.service
6810
   sed -i "s|ExecStart=.*|ExecStart=$GOPATH/src/github.com/gogits/gogs/gogs web|g" /etc/systemd/system/gogs.service
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
   systemctl enable gogs
6812
   systemctl enable gogs
6813
   systemctl daemon-reload
6813
   systemctl daemon-reload
6814
   systemctl restart gogs
6814
   systemctl restart gogs
8463
       echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8463
       echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8464
       echo 'chown -R git:git /home/git' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8464
       echo 'chown -R git:git /home/git' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8465
       echo 'chmod 600 /home/git/go/src/github.com/gogits/gogs/custom/conf/app.ini' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
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
       echo 'go build' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8467
       echo 'go build' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8468
       echo 'systemctl restart gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8468
       echo 'systemctl restart gogs' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8469
       echo 'systemctl daemon-reload' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8469
       echo 'systemctl daemon-reload' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME