Commit | Line | Data |
---|---|---|
c638d827 CR |
1 | #!/bin/sh -e |
2 | # | |
3 | # roundup Startup script for the roundup http server. | |
4 | # | |
5 | # Version: $Id: roundup.rc-debian,v 1.1 2003-10-07 23:02:58 richard Exp $ | |
6 | ||
7 | DESC='Roundup HTTP-Server' | |
8 | ||
9 | BINFILE=roundup-server | |
10 | EXECUTABLE=/usr/local/bin/$BINFILE | |
11 | PIDFILE=/var/run/roundup/server.pid | |
12 | LOGFILE=/var/log/roundup/roundup.log | |
13 | TRACKERS=tttech=/tttech/org/software/roundup/tttech/ | |
14 | OPTIONS="-- -p 8080 -u roundup -d $PIDFILE -l $LOGFILE $TRACKERS" | |
15 | ||
16 | ||
17 | test -x $EXECUTABLE || exit 0 | |
18 | ||
19 | start_stop() { | |
20 | case "$1" in | |
21 | start) | |
22 | printf "Starting $DESC:" | |
23 | start-stop-daemon --start --oknodo --quiet \ | |
24 | --pidfile $PIDFILE \ | |
25 | --exec $EXECUTABLE $OPTIONS | |
26 | printf " $BINFILE" | |
27 | printf ".\n" | |
28 | ;; | |
29 | stop) | |
30 | printf "Stopping $DESC:" | |
31 | start-stop-daemon --stop --oknodo --quiet \ | |
32 | --pidfile $PIDFILE \ | |
33 | --exec $EXECUTABLE $OPTIONS | |
34 | printf " $BINFILE" | |
35 | printf ".\n" | |
36 | ;; | |
37 | restart | force-reload) | |
38 | start_stop stop | |
39 | sleep 1 | |
40 | start_stop start | |
41 | ;; | |
42 | *) | |
43 | printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2 | |
44 | exit 1 | |
45 | ;; | |
46 | esac | |
47 | } | |
48 | ||
49 | start_stop "$@" | |
50 | ||
51 | exit 0 |