[2018-11-09 22:16] Michael Biebl <bi...@debian.org> > Just tried the > #!/usr/bin/env /lib/init/init-d-script > proposal. > Seem like this breaks the systemctl integration again. > See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826214
Wierd. I have no systemd box to check, but are you sure it works with #!/lib/init/init-d-script? I did little experiment: $ cat /tmp/foo.sh #!/tmp/interpreter.sh $ cat /tmp/bar.sh #!/usr/bin/env /tmp/interpreter.sh $ cat /tmp/interpreter.sh #!/bin/sh printf '$# = %d\n' "$#" printf '$0 = %s\n' "$0" for arg ; do printf '= %s\n' "$arg" done $ /tmp/foo.sh $# = 3 $0 = /tmp/interpreter.sh = /tmp/foo.sh = x = y $ /tmp/bar.sh $# = 3 $0 = /tmp/interpreter.sh = /tmp/bar.sh = x = y As you can see, in both cases $0 is path to interpreter, $1 name of script, $2... is args. I fail to see how interpreter could distinguish these two cases.