summaryrefslogtreecommitdiff
path: root/emulators/tpm-emulator/files/tpmd.in
blob: cb8c36cd724d2218b2039023a9ab0096b2ea00df (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
#!/bin/sh

# $FreeBSD$
#
# PROVIDE: tpmd
# REQUIRE: SERVERS
# BEFORE:  tcsd
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# tpmd_enable (bool):	Set to NO by default.
#			Set it to YES to enable tpmd.

. /etc/rc.subr

name=tpmd
rcvar="${name}_enable"
command="%%PREFIX%%/bin/${name}"

load_rc_config $name

: ${tpmd_enable:="NO"}
: ${tpmd_user:="%%USERS%%"}
: ${tpmd_group:="%%GROUPS%%"}

command_args="-o ${tpmd_user} -g ${tpmd_group}"
unset tpmd_user tpmd_group

run_rc_command "$1"