Darac Marjal writes: > On the face of it, this *should* still work. When you invoke > "/etc/init.d/example status", you're running the shell script directly - > that is, without any reference to systemd. Now, I don't remember the > details, but I seem to recall there being a command (which a skeleton > shell script might import from somewhere) that says "Is systemd running? > In which case pass the argument to that", but without seeing the > contents of your script I can't say if it's doing that. > > Try adding "set -x" at the top of your script to help with debugging > it?
Thanks for your reply. I added 'set -x' at the top of the script and got lots of debug lines starting with +. the relevant ones seem to be these: ... +++ local command=status +++ case "$command" in +++ service=sip-proxy.service ++++ systemctl -p LoadState show sip-proxy.service +++ state=LoadState=loaded +++ '[' LoadState=loaded = LoadState=masked ']' +++ '[' status = status ']' +++ /bin/systemctl status sip-proxy.service ... That is, instead of the statements in /etc/init.d/sip-proxy status), it runs 'bin/systemctl status sip-proxy.service' The question is, is there any means to prevent systemd from highjacking my status statements? -- Juha