diff --git a/run-git.sh b/run-git.sh index 960591a..1b29bb0 100755 --- a/run-git.sh +++ b/run-git.sh @@ -1,13 +1,13 @@ echo 'Starting gogs git service in screen...' #screen -dmS gogs #screen -S gogs -X stuff "/root/gogs/gogs web\n" -cd ~/git/ +cd /root/git sudo pm2 start -x './gogs/gogs' -n git.gogs -- web # sudo it so that pm2 list shows it as root -cd ~ +cd /root echo 'Starting http2https web service in pm2...' -cd ~/git/www +cd /root/git/git.faronear.org sudo pm2 start server.js --name git.http2https # sudo it so that pm2 list shows it as root -cd ~/ +cd /root echo 'Done!' diff --git a/setup-debian.sh b/setup-debian.sh index 0c4e050..3b907a9 100644 --- a/setup-debian.sh +++ b/setup-debian.sh @@ -38,7 +38,7 @@ echo ">>> set autostart" mv /etc/rc.local /etc/rc.local.backup touch /etc/rc.local chmod +x /etc/rc.local -echo '#!/bin/bash' > /etc/local # can't omit, otherwise you can't launch pm2 in autostart.sh. Don't use double quote here, otherwise error. +echo '#!/bin/bash' > /etc/rc.local # can't omit, otherwise you can't launch pm2 in autostart.sh. Don't use double quote here, otherwise error. echo 'source /root/autostart.sh' >> /etc/rc.local # make sure to sudo pm2 in autostart.sh, otherwise pm2 list can't find it as root. touch /root/autostart.sh chmod +x /root/autostart.sh