improve
This commit is contained in:
parent
517634b735
commit
a63b8df1f4
@ -1,13 +1,13 @@
|
|||||||
echo 'Starting gogs git service in screen...'
|
echo 'Starting gogs git service in screen...'
|
||||||
#screen -dmS gogs
|
#screen -dmS gogs
|
||||||
#screen -S gogs -X stuff "/root/gogs/gogs web\n"
|
#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
|
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...'
|
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
|
sudo pm2 start server.js --name git.http2https # sudo it so that pm2 list shows it as root
|
||||||
cd ~/
|
cd /root
|
||||||
|
|
||||||
echo 'Done!'
|
echo 'Done!'
|
||||||
|
@ -38,7 +38,7 @@ echo ">>> set autostart"
|
|||||||
mv /etc/rc.local /etc/rc.local.backup
|
mv /etc/rc.local /etc/rc.local.backup
|
||||||
touch /etc/rc.local
|
touch /etc/rc.local
|
||||||
chmod +x /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.
|
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
|
touch /root/autostart.sh
|
||||||
chmod +x /root/autostart.sh
|
chmod +x /root/autostart.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user