mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-05 01:55:52 +00:00
39 lines
766 B
Bash
39 lines
766 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: tcsd
|
|
# REQUIRE: SERVERS tpmd
|
|
# BEFORE: named hastd kerberos
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# tcsd_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable tcsd.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=tcsd
|
|
rcvar=tcsd_enable
|
|
command="%%PREFIX%%/sbin/${name}"
|
|
start_precmd="tcsd_precmd"
|
|
required_files="%%PREFIX%%/etc/${name}.conf"
|
|
|
|
tcsd_precmd()
|
|
{
|
|
/usr/bin/install -d -m 0700 -o %%USERS%% -g %%GROUPS%% \
|
|
/var/run/tpm /var/run/ima %%PREFIX%%/var/lib/tpm
|
|
/usr/sbin/chown %%USERS%%:%%GROUPS%% \
|
|
%%PREFIX%%/etc/tcsd.conf
|
|
/bin/chmod 0600 \
|
|
%%PREFIX%%/etc/tcsd.conf
|
|
}
|
|
|
|
load_rc_config $name
|
|
|
|
: ${tcsd_enable:="NO"}
|
|
|
|
run_rc_command "$1"
|