blob: 691ce10bcd9b678165aa85a2746195c5403f1378 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/sbin/openrc-run
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
}
|