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