研究出来了通过 /etc/rc.local -> /root/autostart.sh 自启动的方法

This commit is contained in:
luk.lu
2019-10-09 13:26:39 +08:00
parent 68b8fced7c
commit c0d8243ba7
3 changed files with 6 additions and 5 deletions

View File

@@ -2,12 +2,12 @@ echo 'Starting gogs git service in screen...'
#screen -dmS gogs
#screen -S gogs -X stuff "/root/gogs/gogs web\n"
cd ~/git/
pm2 start -x './gogs/gogs' -n git.gogs -- web
sudo pm2 start -x './gogs/gogs' -n git.gogs -- web # sudo it so that pm2 list shows it as root
cd ~
echo 'Starting http2https web service in pm2...'
cd ~/git/www
pm2 start server.js --name git.http2https
sudo pm2 start server.js --name git.http2https # sudo it so that pm2 list shows it as root
cd ~/
echo 'Done!'