summaryrefslogtreecommitdiff
path: root/mail-mta/citadel/files/citadel.init
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2013-05-14 04:55:18 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2013-05-14 04:55:18 +0300
commitdc322dadb3089c9c23be48e3a1448868d21bd251 (patch)
tree431b4c3c255e7ab8d6440ed03c11bfe28a366c21 /mail-mta/citadel/files/citadel.init
parent697ae6a97f42fa545561e9a25439288bc91bdb83 (diff)
new file: dev-libs/libcitadel/libcitadel-9999.ebuild
new file: mail-mta/citadel/citadel-9999.ebuild new file: mail-mta/citadel/files/citadel.init
Diffstat (limited to 'mail-mta/citadel/files/citadel.init')
-rw-r--r--mail-mta/citadel/files/citadel.init36
1 files changed, 36 insertions, 0 deletions
diff --git a/mail-mta/citadel/files/citadel.init b/mail-mta/citadel/files/citadel.init
new file mode 100644
index 0000000..7d76679
--- /dev/null
+++ b/mail-mta/citadel/files/citadel.init
@@ -0,0 +1,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"
+}