pm2 autostart

2017-04-06  本文已影响58人  9682f4e55d71
  1. 设置 pm2 开机启动,执行下面的脚本即可
#!/bin/bash
pm2 start /data/www/mobi/mobi_pm2.json && \
   pm2 save && \
   pm2 startup

# then it has a file in /etc/init.d/pm2-root
# [root@dbquan-pc ~]# chkconfig | grep pm2
# pm2-root        0:off   1:off   2:on    3:on    4:on    5:on    6:off
#
# ok, nexttime reboot will auto restart pm2


# [PM2] Freeze a process list on reboot via:
# $ pm2 save
#
# [PM2] Remove init script via:
# $ pm2 unstartup systemv
上一篇 下一篇

猜你喜欢

热点阅读