Saturday, April 16, 2016

Add service daemon to Ubuntu

  1. Create a script in /etc/init.d, say we have it named as awesome_script.sh
  2. Make the script executable, chmod +x awesome_script.sh
  3. Make the daemon starts automatically when system starts
    • sudo update-rc.d awesome_script.sh defaults
  4. Remove the daemon:
    • sudo update-rc.d -f awesome_script.sh remove

No comments:

Post a Comment