wiki/translated_sandbox/hi3536dv100/etc/init.d/S99rcjoystick

24 lines
239 B
Bash

#!/bin/sh
start() {
/usr/bin/rcjoystick -t 25 -c 16 -i wlan0 &
}
stop() {
killall rcjoystick
}
restart() {
stop
sleep 1
start
}
case "$1" in
start|stop|restart)
"$1";;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac