blob: d4d75ab854fab9c7219d7e1e040aaee8aa60d30a (
plain)
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
|
#!/sbin/openrc-run
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
PIDFILE="/var/run/ldap-agent.pid"
CONFIGFILE="/etc/dirsrv/config/ldap-agent.conf"
# instance support in progress
depend() {
need net
use logger snmpd
}
start() {
ebegin "Starting 389 Directory Server ldap-snmp agent"
start-stop-daemon --start --quiet -b \
--pidfile ${PIDFILE} --exec /usr/sbin/ldap-agent -- ${CONFIGFILE}
eend ${?}
if [ "${?}" != "0" ]; then
local entries=/etc/dirsrv/slapd-*
if [ -n "${entries}" ]; then
ewarn "Please make sure that ${CONFIGFILE} contains at least"
ewarn "one of the following entries:"
for entry in ${entries}; do
entry=$(basename ${entry})
ewarn "server ${entry}"
done
fi
fi
}
stop() {
ebegin "Stopping 389 Directory Server ldap-snmp agent"
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
eend ${?}
}
restart() {
svc_stop
sleep 2
svc_start
}
|