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

前端 未结 16 1254
失恋的感觉
失恋的感觉 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 07:56

    In Ubuntu I noticed there are 2 files. The real one is /etc/init.d/rc.local; it seems the other /etc/rc.local is bogus?

    Once I modified the correct one (/etc/init.d/rc.local) it did execute just as expected.

提交回复
热议问题