12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #! /bin/sh
- ### BEGIN INIT INFO
- # Provides: ffpb-debugserver
- # Required-Start: $remote_fs $syslog
- # Required-Stop: $remote_fs $syslog
- # Default-Start: 2 3 4 5
- # Default-Stop:
- # Short-Description: Freifunk Paderborn debugserver
- ### END INIT INFO
- set -e
- umask 022
- if test -f /etc/default/ffpb-debugserver; then
- . /etc/default/ffpb-debugserver
- fi
- . /lib/lsb/init-functions
- export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
- case "$1" in
- start)
- log_daemon_msg "Starting Freifunk Paderborn Debugserver" "ffpb-debugserver" || true
- if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/ffpb-debugserver.pid --exec /opt/debugserver/server.py -- $DEBUGSERVER_OPTS; then
- log_end_msg 0 || true
- else
- log_end_msg 1 || true
- fi
- ;;
- stop)
- log_daemon_msg "Stopping Freifunk Paderborn Debugserver" "ffpb-debugserver" || true
- if start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/ffpb-debugserver.pid; then
- log_end_msg 0 || true
- else
- log_end_msg 1 || true
- fi
- ;;
- restart)
- stop
- start
- ;;
- *)
- log_action_msg "Usage: $0 {start|stop|restart}" || true
- exit 1
- esac
- exit 0
|