aboutsummaryrefslogtreecommitdiffstats
path: root/main/nss-pam-ldapd/nslcd.initd
blob: 301d4e82d817fd373b21d0a5bce317b917694d28 (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/openrc-run

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 $?
}