Hi tried to add my nagios service to the runlevel 1-5 (or at least 2). But when I used the command
sudo update-rc.d nagios default
I received the error
update-rc.d: warning: /etc/init.d/nagios missing LSB keyword 'default-start'
update-rc.d: warning: /etc/init.d/nagios missing LSB keyword 'default-stop'
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
-n: not really
-f: force
The disable|enable API is not stable and might change in the future.
Since there are only symbolic links in the /etc/rc2.d folder my next idea would be to just simple create a symbolic link to the binary. But I am not sure if this is a good idea since there must be a reason for a existing update-rc.d program?
I am using Ubuntu 14.04.
the all-important letter 's'
You've missed the obvious. You typed
and the command told you that the syntax was Note the spelling:defaults
broken nagios LSB headers
As for the warnings about the nagios LSB headers: As I've said at https://unix.stackexchange.com/a/200281/5132 and at https://askubuntu.com/a/617822/43344, you're far better off not starting from there in the first place. The Nagios Enterprises supplied System 5
rc
script doesn't have a proper, complete, set of LSB headers. But it's foolish to waste time fixing it.You're using Ubuntu Linux. You have upstart here with version 14, and you'll have systemd if you ever upgrade. Begin with a systemd unit file, or an upstart job file.
nagios.service
file written by David Kowis.nagios.conf
file written by Remy van Elst that is part of a guide to installing nagios on your very version of Ubuntu.(If you really must: The Debian people have fixed it in their nagios3 source package and so has someone named "djibril".)
Further reading