2018-10-05 22:46:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# PROVIDE: albatross_console
|
|
|
|
# REQUIRE: LOGIN
|
2018-11-08 08:42:48 +00:00
|
|
|
# KEYWORD: shutdown
|
2018-10-05 22:46:53 +00:00
|
|
|
#
|
|
|
|
# Define these albatross_console_* variables in one of these files
|
|
|
|
# /etc/rc.conf
|
|
|
|
# /etc/rc.conf.local
|
|
|
|
# /etc/rc.conf.d/albatross_console
|
|
|
|
# /usr/local/etc/rc.conf.d/albatross_console
|
|
|
|
#
|
|
|
|
# albatross_console_flags:
|
|
|
|
# Default: ""
|
|
|
|
#
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name=albatross_console
|
|
|
|
rcvar=${name}_enable
|
|
|
|
desc="Albatross console service"
|
|
|
|
load_rc_config $name
|
|
|
|
start_cmd="albatross_console_start"
|
|
|
|
|
|
|
|
: ${albatross_console_enable:="NO"}
|
|
|
|
: ${albatross_console_flags:=""}
|
|
|
|
: ${albatross_console_user:="albatross"}
|
|
|
|
|
|
|
|
pidfile="/var/run/albatross_console.pid"
|
2018-10-25 14:55:54 +00:00
|
|
|
procname="/usr/local/libexec/albatross/vmmd_console"
|
2018-10-05 22:46:53 +00:00
|
|
|
|
|
|
|
albatross_console_start () {
|
2018-11-08 08:50:20 +00:00
|
|
|
echo "Starting ${name}."
|
2018-10-12 17:56:17 +00:00
|
|
|
/usr/sbin/daemon -S -p "${pidfile}" -u "${albatross_console_user}" \
|
2018-11-08 07:51:37 +00:00
|
|
|
"${procname}" ${albatross_console_flags}
|
2018-10-05 22:46:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|