Ubuntu 14.04 - pm2 startup not starting after reboot

前端 未结 5 1931
南旧
南旧 2021-01-02 13:04

I am using pm2 to start a node.js process, and I would like this process to be started automatically when the system (Ubuntu 14.04 on Intel Atom processor) is booted. I have

5条回答
  •  -上瘾入骨i
    2021-01-02 13:28

    I been searching for work around for quit while till i came to this solution

    after executing pm2 save

    1. this file will be created -> /etc/init.d/pm2-init.sh
    2. then on cron tab @reboot root /etc/init.d/pm2-init.sh start this equivalent to executing it on cmd but triggered on reboot

    this is working fine for me now

提交回复
热议问题