Start app as root with pm2

前端 未结 7 1621
遥遥无期
遥遥无期 2021-01-31 17:29

I have a daemon that must be run as root on startup.

I use pm2 to start other apps but can not figure out if it can start an app as root. Can it be done?

If not,

7条回答
  •  抹茶落季
    2021-01-31 18:12

    you might consider routing your traffic with iptables, since there is a reason behind this errror

    sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
    

提交回复
热议问题