I currently maintain an experimental spin-off of the „nodm“ minimal display manager written by Mr. Enrico Zini:
- Spin-Off project site: https://git.devuan.org/tilt/nodm
As has been reported, in recent installations of „nodm“ from Debian packages up to version 0.11.1-3 (Debian unstable), the „restart“ action of the sysvinit-script does not reliably restart „nodm“.
This is due to the fact that a nodm process that has been backgrounded using start-stop-daemon --background (as the sysvinit-script does it) can not be stopped in a manner that could reliably report the shutdown status. In the case of the „restart“ action, this has the consequence that the „start“ action is attempted before the „stop“ action has finished, resulting in an error.
I have mitigated this problem by introducing a NODM_RESTART_RETRY option to /etc/default/nodm that defaults to 10 and specifies a time (in seconds) during which the nodm command will retry to start the display manager. It will retry once per second.
This is of course not a very good solution, because the amount of time that should be spent can arbitrarily differ between sites. Given certain load or runtime environments, a display manager might take more than 10 seconds to shut down.
It is my intention to extend „nodm“ by completed built-in service management facilities that make it agnostic of specific init-systems and independent from tools such as start-stop-daemon. It then could provide its own, built-in procedure for starting and stopping a specific display manager. How to accomplish this is currently subject to a vivid debate, especially in the community of Linux distributors.
In the meantime, i provide aforementioned „restart-retry“ feature as a workaround.