blob: 7d766795354c45c67cf3297fe633479979e0f900 (
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
|
#!/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
svc_start() {
ebegin "Starting citserver"
start-stop-daemon --start --exec /usr/sbin/citserver -- ${CITSERVER_OPTS}
eend $?
}
svc_stop() {
ebegin "Stopping citserver"
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
eend $?
}
restart() {
ebegin "Restarting citserver"
svc_stop && sleep 3 && svc_start
eend $? "Failed to restart Citadel"
}
|