albatross/packaging/rc.d/albatross_tls

40 lines
841 B
Plaintext
Raw Normal View History

2018-10-29 21:23:34 +00:00
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: albatross_tls
# REQUIRE: LOGIN albatross_daemon
# KEYWORD: shutdown nojail
#
# Define these albatross_tls_* variables in one of these files
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/albatross_tls
# /usr/local/etc/rc.conf.d/albatross_tls
#
# albatross_tls_flags:
# Default: ""
#
. /etc/rc.subr
name=albatross_tls
rcvar=${name}_enable
desc="Albatross tls service"
load_rc_config $name
start_cmd="albatross_tls_start"
: ${albatross_tls_enable:="NO"}
: ${albatross_tls_flags:=""}
: ${albatross_tls_user:="albatross"}
pidfile="/var/run/albatross_tls.pid"
procname="/usr/local/libexec/albatross/vmmd_tls"
albatross_tls_start () {
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_tls_user}" \
"${procname}" "${albatross_tls_flags}"
}
run_rc_command "$1"