summaryrefslogtreecommitdiffstats
path: root/testing/nss-pam-ldapd/nslcd.initd
blob: 0fab4de9efc72b8ec092194d93e7dfcfc91eda30 (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
#!/sbin/runscript

extra_commands="checkconfig"
cfg="/etc/nslcd.conf"
command=/usr/sbin/nslcd
pidfile=/var/run/nslcd/nslcd.pid


depend() {
	need net	
	after firewall
	use dns logger
}

checkconfig() {
	if [ -f "$cfg" ] ; then
		return 0
	fi
	eerror "Please create $cfg"
	eerror "Example config: /usr/share/nss-ldapd/nslcd.conf"
	return 1
}

start_pre() {
	checkpath -q -d ${pidfile%/*} -o nslcd:nslcd
	checkconfig || return $?
}