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

前端 未结 16 1236
失恋的感觉
失恋的感觉 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:55

    I had the same problem (on CentOS 7) and I fixed it by giving execute permissions to /etc/local:

    chmod +x /etc/rc.local
    

提交回复
热议问题