blob: 9d93d402f096104dae02e2e6d7108861592f9258 [file] [log] [blame]
#!/bin/sh
case "$1" in
start)
# don't pipe the output through logger or logos, because they aren't
# running at realtime priority, so rtwatcher output would get lost
# exactly when it's useful. Thus rtwatcher already formats its output
# appropriately for direct dumping to /dev/kmsg.
if is-storage-box || is-tv-box; then
babysit 60 rtwatcher >/dev/kmsg 2>&1 &
fi
;;
stop)
pkillwait -x rtwatcher
;;
restart)
$0 stop; $0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac