On Raspberry Pi I have a script file in /etc/init.d folder named "instore". After I execute the command
service instore restart
the omxplayer process should stop. But this is not the case. The relevant part of the script:
do_start () {
log_daemon_msg "Starting $DAEMON_NAME daemon"
start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS
log_end_msg $?
}
do_stop () {
log_daemon_msg "Stopping $DAEMON_NAME daemon"
start-stop-daemon --stop --pidfile $PIDFILE --retry 10
killall -9 omxplayer omxplayer.bin &> /dev/null
log_end_msg $?
}
case "$1" in
start|stop)
do_${1}
;;
restart|reload|force-reload)
do_stop
do_start
;;
status)
status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
;;
*)
echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
exit 1
;;
If I use the command
killall -9 omxplayer
in the terminal the process always stops. Anybody knows what can be the problem?