Skip to content

Commit fe51322

Browse files
author
Richard Jones
committed
added Debian rc script
1 parent cc2c12b commit fe51322

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

scripts/README.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ server-ctl
1818
restart, condstart (conditional start - only if server is stopped) and
1919
status commands.
2020

21+
roundup.rc-debian
22+
An control script that may be installed in /etc/init.d on Debian systems.
23+
Offers start, stop and restart commands and integrates with the Debian
24+
init process.
25+

scripts/roundup.rc-debian

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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

0 commit comments

Comments
 (0)