diff options
author | Marcin Deranek <marcin.deranek@slonko.net> | 2014-09-29 09:02:24 +0200 |
---|---|---|
committer | Marcin Deranek <marcin.deranek@slonko.net> | 2014-09-29 09:02:24 +0200 |
commit | 103cf8b2ebc990a52011b7b0adeab45dc63ee99d (patch) | |
tree | 8cf2d2fef53dd6a17ed142614ccc255f3db29246 /net-mail/sympa/files/sympa-6.0.initd | |
download | portage-103cf8b2ebc990a52011b7b0adeab45dc63ee99d.tar.gz portage-103cf8b2ebc990a52011b7b0adeab45dc63ee99d.tar.bz2 portage-103cf8b2ebc990a52011b7b0adeab45dc63ee99d.zip |
Initial commit
Diffstat (limited to 'net-mail/sympa/files/sympa-6.0.initd')
-rw-r--r-- | net-mail/sympa/files/sympa-6.0.initd | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/net-mail/sympa/files/sympa-6.0.initd b/net-mail/sympa/files/sympa-6.0.initd new file mode 100644 index 0000000..81b8321 --- /dev/null +++ b/net-mail/sympa/files/sympa-6.0.initd @@ -0,0 +1,53 @@ +#!/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: " + 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 --quiet --pidfile /var/run/sympa/$1.pid + eend $? + fi +} + +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 bulk + sympa_start archived + sympa_start bounced + sympa_start task_manager +} + +stop(){ + echo "Stopping Sympa subsystems: " + sympa_stop bounced + sympa_stop archived + sympa_stop bulk + sympa_stop sympa + sympa_stop task_manager + sympa_stop sympa-distribute + sympa_stop sympa-creation +} |