mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
62f5da796b
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
diff -Nur razercfg-0.21.orig/razerd.initscript razercfg-0.21/razerd.initscript
|
|
--- razercfg-0.21.orig/razerd.initscript 2013-07-30 04:54:30.000000000 -0500
|
|
+++ razercfg-0.21/razerd.initscript 2013-12-02 00:32:40.664988672 -0600
|
|
@@ -12,34 +12,33 @@
|
|
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
|
|
NAME=razerd
|
|
DAEMON="$(which $NAME)"
|
|
-PIDFILE="/run/razerd/razerd.pid"
|
|
+PIDFILE="/var/run/razerd/razerd.pid"
|
|
DESC="Razer device state daemon"
|
|
|
|
-. /lib/lsb/init-functions
|
|
+. /etc/rc.d/init.d/functions
|
|
|
|
case "$1" in
|
|
start)
|
|
- log_begin_msg "Starting $DESC: $NAME"
|
|
- start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
|
- --oknodo --exec "$DAEMON" -- \
|
|
- -f -B -P $PIDFILE
|
|
- log_end_msg $?
|
|
+ mkdir -p $(dirname ${PIDFILE})
|
|
+ action $"Starting $DESC: $NAME" \
|
|
+ daemon --pidfile $PIDFILE $DAEMON -f -B -P $PIDFILE
|
|
;;
|
|
stop)
|
|
- log_begin_msg "Stopping $DESC: $NAME"
|
|
- start-stop-daemon --stop --quiet --pidfile $PIDFILE \
|
|
- --name "$NAME"
|
|
+ action $"Stopping $DESC: $NAME" \
|
|
+ killproc -p $PIDFILE
|
|
RES=$?
|
|
rm -f $PIDFILE
|
|
- log_end_msg $RES
|
|
;;
|
|
- restart|reload|force-reload)
|
|
+ restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
+ status)
|
|
+ status -p $PIDFILE $NAME
|
|
+ ;;
|
|
*)
|
|
- echo "Usage $0 [start|stop|restart|reload|force-reload]"
|
|
+ echo "Usage $0 [start|stop|restart|status]"
|
|
exit 1
|
|
;;
|
|
esac
|