Closed marcosfrm closed 8 months ago
Unfortunately, we rely on the initscript will source init.d/function There we hijack the script and call systemctl which will tell systemd to actually run the initscript https://github.com/fedora-sysv/initscripts/blob/main/etc/rc.d/init.d/functions#L681
This was done due to reasons already forgotten by history. But one example is that we also wanted to start the initrscripts through systemd if it is called directly. So please source the init.d/functions in your initscript.
Ok, that works. Thank you.
Consider a test init script
/etc/rc.d/init.d/AwesomeDaemon
. Afterchkconfig --add AwesomeDaemon
we get the generated unit (once fixed: https://github.com/fedora-sysv/chkconfig/pull/117):Here is the catch... if I call
service AwesomeDaemon start
, it does not go through systemd:The daemon is running, but without systemd supervision. Why is that? Debian's equivalent,
invoke-rc.d
, callssystemctl <action> <daemon>
is this case.CentOS Stream 9, initscripts-10.11.5-1.el9.x86_64.