Run script with rc.local: script works, but not at boot

前端 未结 16 1271
失恋的感觉
失恋的感觉 2020-12-02 07:38

I have a node.js script which need to start at boot and run under the www-data user. During development I always started the script with:

su www-dat         


        
16条回答
  •  没有蜡笔的小新
    2020-12-02 08:06

    You might also have made it work by specifying the full path to node. Furthermore, when you want to run a shell command as a daemon you should close stdin by adding 1<&- before the &.

提交回复
热议问题