blob: be481a6b8613a933e15cc106af0db2decf7b3adc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/sh
#
# Razer device configuration tool
# Generic init script
#
# Copyright (c) 2009 Michael Buesch
#
# Path to the PID-file
PIDFILE="/var/run/razerd/razerd.pid"
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
case "$1" in
start)
razerd -B -P $PIDFILE
res=$?
if [ $res -eq 0 ]; then
echo "Service razerd started."
else
echo "Failed to start razerd."
fi
;;
stop)
if [ -r "$PIDFILE" ]; then
kill `cat $PIDFILE`
echo "Service razerd stopped."
else
echo "Service razerd is not running."
fi
;;
restart|reload|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage $0 [start|stop|restart|reload|force-reload]"
exit 1
;;
esac
exit 0
|