I want to replace a general purpose startup script, /etc/init.d/dkim with a specific one that is simply the execute script with all the settings I want in a single line. I call my new script opendk which I put into /etc/init.d
Does that mean opendk will get executed on boot?
I also went into yast and set the built in dkim service to “No” for startup…however, dkim is still is in init.d How does openSuse know to not execute this script?
What what about runlevels ( rc.0, rc.1, … ). Do I have to bother with them? :sarcastic:
If you’re using the right syntax in your script and you enable it at certain runlevels, it will be executed when the init process enter those runlevels.
By creating symlinks in the subdirectories of /etc/init.d corresponding to the differents runlevels.
No. Bu it’s cleaner to put this runlevels in a default-stop line in your script’s header. Maybe you can take a look at this script, as a lsb and chkconfig compliant one (at least I hope so): automatically recompile kernel modules after kernel update. You can probably use a similar header for your script (change the text in red):
# chkconfig: 35 30 70
# description: what it does
#
### BEGIN INIT INFO
# Provides: what's its name
# Required-Start: $syslog
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: what it does again
### END INIT INFO