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