summaryrefslogtreecommitdiff
path: root/net-mail/sympa/files/sympa-5.4.initd
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/sympa/files/sympa-5.4.initd')
-rw-r--r--net-mail/sympa/files/sympa-5.4.initd49
1 files changed, 49 insertions, 0 deletions
diff --git a/net-mail/sympa/files/sympa-5.4.initd b/net-mail/sympa/files/sympa-5.4.initd
new file mode 100644
index 0000000..9acb21c
--- /dev/null
+++ b/net-mail/sympa/files/sympa-5.4.initd
@@ -0,0 +1,49 @@
+#!/sbin/runscript
+
+opts="depend start stop"
+sympaconf="/etc/sympa/sympa.conf"
+wwsympaconf="/etc/sympa/wwsympa.conf"
+sympadir="/usr"
+depend() {
+ use logger mysql postgres ldap
+ before apache apache2 lighttpd
+}
+
+sympa_start() {
+ ebegin "Starting Sympa module $1.pl: "
+ local MY_PID="/var/run/sympa/$1.pid"
+ start-stop-daemon --start --quiet --pidfile ${MY_PID} --exec $sympadir/sbin/$1.pl
+ eend $?
+}
+
+sympa_stop() {
+ ebegin "Stopping Sympa module $1.pl: "
+ local MY_PID="/var/run/sympa/$1.pid"
+ start-stop-daemon --stop --quiet --pidfile ${MY_PID}
+ eend $?
+}
+
+start() {
+ #Check config files
+ if [ ! -f $sympaconf ]; then
+ eerror "Missing Sympa config!"
+ return 1
+ fi
+ if [ ! -f $wwsympaconf ]; then
+ eerror "Missing WWSympa config!"
+ return 1
+ fi
+ echo "Starting Sympa subsystems: "
+ sympa_start sympa
+ sympa_start bounced
+ sympa_start archived
+ sympa_start task_manager
+}
+
+stop(){
+ echo "Stopping Sympa subsystems: "
+ sympa_stop bounced
+ sympa_stop archived
+ sympa_stop sympa
+ sympa_stop task_manager
+}