On 2015-07-07 22:36:23 +0400, Sergey Kirpichev wrote: > On Jul 7, 2015 2:45 PM, "Vincent Lefevre" <vinc...@vinc17.net> wrote: > > The configuration snippets in /etc/monit/monitrc.d assume sysvinit. > > No. LSB. > > > There should be some comment, and possibly a check of the init system > > If your init system is broken enough to not conform to LSB - there is > nothing to comment in the config files.
There seems to be lots of contraditory information about that, but based on official information, this seems to be against the Debian policy (actually even with sysvinit, this would be incorrect): https://www.debian.org/doc/debian-policy/ch-opersys.html 9.3.3 Interfacing with the initscript system Maintainers should use the abstraction layer provided by the update-rc.d and invoke-rc.d programs to deal with initscripts in their packages' scripts such as postinst, prerm and postrm. Directly managing the /etc/rc?.d links and directly invoking the /etc/init.d/ initscripts should be done only by packages providing the initscript subsystem (such as sysv-rc and file-rc). https://debian-handbook.info/browse/stable/unix-services.html also says: DEBIAN POLICY Restarting services The maintainer scripts for Debian packages will sometimes restart certain services to ensure their availability or get them to take certain options into account. The command that controls a service — /etc/init.d/service operation — doesn't take runlevel into consideration, assumes (wrongly) that the service is currently being used, and may thus initiate incorrect operations (starting a service that was deliberately stopped, or stopping a service that is already stopped, etc.). Debian therefore introduced the invoke-rc.d program: this program must be used by maintainer scripts to run services initialization scripts and it will only execute the necessary commands. Note that, contrary to common usage, the .d suffix is used here in a program name, and not in a directory. BTW, if an admin stops a service (without changing the monit config because this may be temporary), it is probably a good thing that monit doesn't force a restart. If I understand correctly, using invoke-rc.d will be allow one to get the expected behavior. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org