I built a package for j-chkmail. This is a milter using the sendmail milter-API and working together with sendmail or postfix. It runs as a daemon and has an init script in /etc/init.d/.
The problem: j-chkmail daemon must be started before sendmail or postfix (to be available for the MTA when it comes up) and shall be stopped after the MTA.
This is the INFO header:
### BEGIN INIT INFO
# Provides: j-chkmail
# Required-Start: $named $network $remote_fs $syslog
# Required-Stop: $syslog
# Should-Start:
# Should-Stop:
# Default-Start: 3 5
# Default-Stop:
# Short-Description: Start j-chkmail (milter)
# Description: Start j-chkmail (milter)
### END INIT INFO
Whatever I put in for “Required-Stop” it is shut down before sendmail.
I found this (rather outdated) note:
The Required-Stop keyword indicates what services must still be running during the shutdown of the service (however, this is currently ignored in SUSE; the reverse order of the Required-Start is used instead).
You also need to look at the /etc/init.d/skeleton file Notes on “Required-Start/Should-Start” Probably need postfix or sendmail in here, based on this the install macro will create the opposing shutdown after this service.
Hi
Yes, it is confusing to read, like you I had to read it all numerous times for it to make sense. Glad yo have it sorted
PS, you might want to look at using speccleaner for your spec files to clean them up. You also need to add some conditions in as it makes some changes to the BuildRequires.