You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
797 B
37 lines
797 B
#! /bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: z21emu
|
|
# Required-Start:
|
|
# Required-Stop:
|
|
# Should-Start:
|
|
# Default-Start:
|
|
# Default-Stop:
|
|
# Short-Description: z21 wrapper to support i2c sensors
|
|
# Description: z21 is a control device for model trains. this software implements a wrapper onto the z21 protocoll so you can connect some i2c devices to the rocrail or any other model train controlling software supporting z21.
|
|
### END INIT INFO
|
|
|
|
PATH=/sbin:/bin:/usr/local/bin:/usr/bin:/usr/sbin
|
|
|
|
case "$1" in
|
|
start)
|
|
/usr/local/bin/z21emu >&2 > /dev/null &
|
|
;;
|
|
restart|reload|force-reload)
|
|
echo "not pupported yet" >&2
|
|
exit 3
|
|
;;
|
|
stop)
|
|
killall z21emu
|
|
;;
|
|
status)
|
|
ps xa -H | grep z21emu
|
|
exit $?
|
|
;;
|
|
*)
|
|
echo "Usage: z21emu.sh [start|stop|status]" >&2
|
|
exit 3
|
|
;;
|
|
esac
|
|
|
|
:
|