1 *** init/rdiff-web 2008-03-05 17:49:11.000000000 +0100
2 --- init/rdiff-web.new 2010-04-15 21:40:59.144537697 +0200
7 # Basic support for the Linux Standard Base Specification 3.1.0
12 # Basic support for the Linux Standard Base Specification 3.1.0
16 # Description: Manages the rdiffWeb daemon
19 ! PIDFILE="/var/run/rdiff-web"
21 ! SUCCESS_MSG="
\e[71G done"
22 ! ERROR_MSG="
\e[71Gfailed"
24 - if [ -f /etc/init.d/functions ]; then
25 - . /etc/init.d/functions
28 - # This script won't be able to run without root privileges.
29 - if [ `id -u` -ne 0 ]; then
30 - echo "Error: this script must be run as root."
35 - # See how we were called.
38 if [ ! -f /etc/rdiffweb/rdw.conf ]; then
39 echo -n "rdiffWeb is not configured! Please run 'rdiff-web-config'."
43 ! echo -n "Starting rdiffWeb..."
44 ! /usr/bin/rdiff-web --pid-file="$PIDFILE" \
45 ! --background > /dev/null 2>&1
51 if [ -e "$PIDFILE" ]; then
52 ! echo -n "Stopping rdiffWeb..."
53 kill `cat "$PIDFILE" 2>/dev/null` > /dev/null 2>&1
54 rm $PIDFILE > /dev/null 2>&1
58 echo -n "rdiffWeb is not running"
61 # Description: Manages the rdiffWeb daemon
64 ! PIDFILE="/var/run/rdiff-web.pid"
67 ! . /etc/rc.d/functions
71 + stat_busy "Starting rdiff WebInterface"
72 if [ ! -f /etc/rdiffweb/rdw.conf ]; then
73 echo -n "rdiffWeb is not configured! Please run 'rdiff-web-config'."
76 ! /usr/bin/rdiff-web --pid-file="$PIDFILE" --background > /dev/null 2>&1 -d
82 if [ -e "$PIDFILE" ]; then
83 ! stat_busy "Stopping rdiff WebInterface"
84 kill `cat "$PIDFILE" 2>/dev/null` > /dev/null 2>&1
85 rm $PIDFILE > /dev/null 2>&1
89 echo -n "rdiffWeb is not running"
97 if [ -e "$PIDFILE" ]; then
101 ! echo "is not running."
110 if [ -e "$PIDFILE" ]; then
111 ! stat_busy "rdiffWeb is running."
114 ! stat_busy "rdiffWeb is not running."
121 echo "Usage: `basename "$0"` {start|stop|status|restart}"