diff options
author | Jan Hambrecht | 2015-06-29 23:20:53 +0200 |
---|---|---|
committer | Jan Hambrecht | 2015-06-29 23:20:53 +0200 |
commit | 71da0b7e13d0bf1535e5484cdcabf9ffc280d4a5 (patch) | |
tree | 68cf82ff8dca110a846d2755d41e9752a651cae5 /spacenavd | |
download | aur-71da0b7e13d0bf1535e5484cdcabf9ffc280d4a5.tar.gz |
Migrate to AUR 4
Diffstat (limited to 'spacenavd')
-rw-r--r-- | spacenavd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/spacenavd b/spacenavd new file mode 100644 index 000000000000..61946197c40b --- /dev/null +++ b/spacenavd @@ -0,0 +1,38 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +DAEMON=/usr/bin/spacenavd + +PID=`pidof -o %PPID $DAEMON` +case "$1" in + start) + stat_busy "Starting Spacenavigator Daemon" + [ -z "$PID" ] && $DAEMON + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon spacenavd + stat_done + fi + ;; + stop) + stat_busy "Stopping Spacenavigator Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon spacenavd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |