contrib/seatd/seatd.service

36 lines
636 B
SYSTEMD
Raw Normal View History

2021-03-15 21:30:08 +01:00
#!/bin/sh
#
# /etc/rc.d/seatd: start/stop seatd daemon
2021-03-15 21:30:08 +01:00
#
SSD=/sbin/start-stop-daemon
PROG=/usr/bin/seatd
OPTS="-g video"
2021-03-15 21:30:08 +01:00
case $1 in
start)
$SSD --start --background --exec $PROG -- $OPTS
;;
2021-03-15 21:30:08 +01:00
stop)
$SSD --stop --retry 10 --exec $PROG
;;
2021-03-15 21:30:08 +01:00
restart)
$0 stop
$0 start
;;
2021-03-15 21:30:08 +01:00
status)
$SSD --status --exec $PROG
case $? in
2021-09-15 19:59:30 +02:00
0) echo "$PROG is running with pid $(pidof $PROG)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
2021-03-15 21:30:08 +01:00
*)
echo "usage: $0 [start|stop|restart|status]"
;;
2021-03-15 21:30:08 +01:00
esac
# End of file