blob: 44891b11e7cb78e2c9ff64f6a799a6722111251d (
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
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: sssd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable `sssd':
#
# sssd_enable="YES"
#
# See sssd(8) for sssd_flags
#
. /etc/rc.subr
name=sssd
rcvar=sssd_enable
# read configuration and set defaults
load_rc_config "$name"
: ${sssd_enable:=NO}
: ${sssd_conf="%%PREFIX%%/etc/sssd/sssd.conf"}
: ${sssd_flags="-f -D"}
command="%%PREFIX%%/sbin/$name"
pidfile="/var/run/$name.pid"
required_files="${sssd_conf}"
start_precmd=sssd_prestart
sssd_prestart()
{
for i in db/sss/db db/sss/gpo_cache db/sss/keytabs db/sss/mc db/sss/pubconf/krb5.include.d/ db/sss/secrets log/sssd run/sss/pipes/private; do
if [ ! -d var/${i} ]; then mkdir -p /var/${i}; fi
done
}
run_rc_command "$1"
|