Sample Header Ad - 728x90

Set daemon to start at boot with systemd

4 votes
2 answers
18540 views
I'm writing a daemon to manage my Java app on a headless **Ubuntu 16.04** box using jsvc and this (probably pre-systemd) tutorial , and got as far as running update-rc.d mydaemon enable, receiving the error update-rc.d: error: mydaemon Default-Start contains no runlevels, aborting Having Googled around a bit this appears to have something to do with the (fairly?) recent move to systemd, which I have confirmed is running with pidof systemd. How do I achieve the same starting-at-boot behaviour as update-rc.d (and more importantly *stopping* the service via /etc/init.d/mydaemon stop rather than just killing the process as the Java app needs to clean up). And are systemd and update-rc.d different systems, or does systemd just change how the latter works?
Asked by Luke M (153 rep)
Sep 3, 2016, 01:46 PM
Last activity: Mar 26, 2020, 01:03 PM