I have this init.d script (/etc/init.d/ctrlme):
#!/lib/init/init-d-script
### BEGIN INIT INFO
# Provides: ctrlme
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: ctrlme
# Description: ctrlme
### END INIT INFO
# sudo cp -v /home/gigikent/bin/init.d-services/ctrlme /etc/init.d/; sudo chown root: /etc/init.d/ctrlme
#
# https://www.pks.mpg.de/~mueller/docs/suse10.1/suselinux-manual_en/manual/sec.boot.init.html
#
NAME=ctrlme
PIDFILE=/run/ctrlme.pid
DAEMON=/bin/bash -c '/home/gigikent/x.sh ctrlme'
DESC=ctrlme
# . /lib/lsb/init-functions
#
# case "$1" in
# start)
# /home/gigikent/x.sh ctrlme
# ;;
# stop|restart|force-reload)
# exit 0
# ;;
# *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2; exit 1 ;;
# esac
which when started fails with:
Jun 16 18:57:13 gigikent.go.ro ctrlme[28454]: /lib/init/init-d-script: 20: /etc/init.d/ctrlme: -c: not found
Jun 16 18:57:13 gigikent.go.ro systemd[1]: ctrlme.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit ctrlme.service has successfully entered the 'dead' state.
Running /bin/bash -c '/home/gigikent/x.sh ctrlme' command works as expected.
Why this happens and how should I solve the problem?
System info:
Ubuntu 19.04