dimanche 22 mars 2015

Where is the log_daemon_msg?


So this is my little shscript (my_init_script.sh) located in /etc/init.d/



#!/bin/sh
. /lib/lsb/init-functions

NAME=my_script_for_auto_update
PIDFILE=/var/run/$NAME.pid


#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

start()
{
start-stop-daemon -S -o -q -m -x -p $PIDFILE /home/ed/start_up_job/test_sort.sh
# log_daemon_msg "Started update"
}

stop() {
start_stop-daemon -K -o -q -m -x -p $PIDFILE /home/ed/start_up_job/test_sort.sh
# log_daemon_msg "Stopped update"
}

case "$1" in
start)
start
;;
stop|force-stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|restart|stop}"
esac


exit 0


When I try to start the init script ($ ./my_init_script.sh start) the output yields



Try 'start-stop-daemon --help' for more information.

Q: Why is this error (still) present? Or is there a way to rewrite my code to bypass this error?



Aucun commentaire:

Enregistrer un commentaire