blob: 023f6ec747d193e193e744d20da1531b167285d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/sbin/runscript
# original Author: Wilfried Goesgens <citadel@outgesourced.org>
# adapted for Gentoo: the_mgt <themgt@mail.ru>
depend() {
use dns logger
need net
provide mta
}
RUNDIR="/var/run/citadel"
DAEMON="/usr/sbin/citserver"
PIDFILE="${RUNDIR}/citadel.pid"
SENDCOMMAND="/usr/sbin/sendcommand"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
start() {
ebegin "Starting citserver"
start-stop-daemon --start --exec /usr/sbin/citserver -- ${CITSERVER_OPTS}
eend $?
}
stop() {
ebegin "Stopping citserver"
${SENDCOMMAND} DOWN &>/dev/null
eend $?
}
restart() {
ebegin "Restarting citserver"
#sleep command mandatory due to long shutdown time!
svc_stop && sleep 3 && svc_start
eend $? "Failed to restart Citadel"
}
|