Projekt

Allgemein

Profil

Herunterladen (1,07 KB) Statistiken
| Zweig: | Markierung: | Revision:
39807402 Moritz Bunkus
#!/bin/sh

### BEGIN INIT INFO
dc8fb58c Moritz Bunkus
# Provides: kivitendo-task-server
39807402 Moritz Bunkus
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
c2d97b23 Moritz Bunkus
# Short-Description: Start/stop the kivitendo task server
39807402 Moritz Bunkus
### END INIT INFO

set -e

c2d97b23 Moritz Bunkus
# Change this to point to the kivitendo "task_server.pl" location.
22462327 Moritz Bunkus
DAEMON="/var/www/kivitendo-erp/scripts/task_server.pl"
c2d97b23 Moritz Bunkus
TOPIC="kivitendo task server"
39807402 Moritz Bunkus
5be5cfeb Moritz Bunkus
if [ ! -x $DAEMON ] ; then
39807402 Moritz Bunkus
echo "$TOPIC executable not found"
exit 1
fi

case $1 in
start)
echo "Starting the $TOPIC"
$DAEMON start
;;
stop)
echo "Stopping the $TOPIC"
$DAEMON stop
;;
restart)
echo "Restarting the $TOPIC"
$DAEMON restart
;;
status)
if $DAEMON status > /dev/null 2> /dev/null; then
echo "The $TOPIC is running"
else
echo "The $TOPIC is not running"
exit 1
fi
;;
*)
dc8fb58c Moritz Bunkus
echo "Usage: /etc/init.d/kivitendo-task-server {start|stop|reload|status}"
39807402 Moritz Bunkus
exit 1
;;
esac