How to run a shell script at startup LSB (Linux standard base)

In the file you put in /etc/init.d/ you have to set it executable with:
chmod +x /etc/init.d/start_my_app
Thanks to @meetamit, if this does not run you have to create a symlink to /etc/rc.d/
ln -s /etc/init.d/start_my_app /etc/rc.d/
Please note that on latest Debian, this will not work as your script have to be LSB compliant (provide, at least, the following actions: start, stop, restart, force-reload, and status):https://wiki.debian.org/LSBInitScripts
LSB (Linux Standard Base)-compliant init scripts need to:
  • provide, at least, the following actions: start, stop, restart, force-reload, and status. 



Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all