albatross/packaging/rc.d/albatross_tls
2018-10-29 22:24:01 +01:00

40 lines
841 B
Bash
Executable file

#!/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"