Default-Pfade in Init-Scripten an Dokumentation anpassen
[kivitendo-erp.git] / scripts / boot / system-v / kivitendo-task-server
1 #!/bin/sh
2
3 ### BEGIN INIT INFO
4 # Provides:          kivitendo-task-server
5 # Required-Start:    $local_fs $remote_fs $network $syslog $named
6 # Required-Stop:     $local_fs $remote_fs $network $syslog $named
7 # Default-Start:     2 3 4 5
8 # Default-Stop:      0 1 6
9 # X-Interactive:     true
10 # Short-Description: Start/stop the kivitendo task server
11 ### END INIT INFO
12
13 set -e
14
15 # Change this to point to the kivitendo "task_server.pl" location.
16 DAEMON="/var/www/kivitendo-erp/scripts/task_server.pl"
17 TOPIC="kivitendo task server"
18
19 if [ ! -x $DAEMON ] ; then
20   echo "$TOPIC executable not found"
21   exit 1
22 fi
23
24 case $1 in
25   start)
26     echo "Starting the $TOPIC"
27     $DAEMON start
28     ;;
29   stop)
30     echo "Stopping the $TOPIC"
31     $DAEMON stop
32     ;;
33   restart)
34     echo "Restarting the $TOPIC"
35     $DAEMON restart
36     ;;
37   status)
38     if $DAEMON status > /dev/null 2> /dev/null; then
39       echo "The $TOPIC is running"
40     else
41       echo "The $TOPIC is not running"
42       exit 1
43     fi
44     ;;
45   *)
46     echo "Usage: /etc/init.d/kivitendo-task-server {start|stop|reload|status}"
47     exit 1
48     ;;
49 esac