53 lines
1.1 KiB
Bash
53 lines
1.1 KiB
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: nova_consoleauth
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable nova_consoleauth:
|
|
#
|
|
# nova_consoleauth_enable="YES"
|
|
#
|
|
# nova_consoleauth_enable (bool):
|
|
# Set it to "YES" to enable nova_consoleauth.
|
|
# Default is "NO".
|
|
#
|
|
# nova_consoleauth_logdir (str):
|
|
# Set it to chagge log directory
|
|
# Default is "/var/log/nova"
|
|
#
|
|
# nova_consoleauth_args (str):
|
|
# Set it to change command line arguments.
|
|
# Default is "--log-file ${nova_consoleauth_logdir}/nova-consoleauth.log"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=nova_consoleauth
|
|
rcvar=nova_consoleauth_enable
|
|
|
|
PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
|
|
|
|
pidfile="/var/run/nova-consoleauth.pid"
|
|
procname="%%PREFIX%%/bin/python2.7"
|
|
|
|
start_precmd=nova_precmd
|
|
|
|
load_rc_config $name
|
|
|
|
: ${nova_consoleauth_enable:="NO"}
|
|
: ${nova_consoleauth_logdir:="/var/log/nova"}
|
|
: ${nova_consoleauth_args:="--log-file ${nova_consoleauth_logdir}/nova-consoleauth.log"}
|
|
|
|
command="/usr/sbin/daemon"
|
|
command_args="-f -p ${pidfile} nova-consoleauth ${nova_consoleauth_args}"
|
|
|
|
nova_precmd() {
|
|
mkdir -p ${nova_consoleauth_logdir}
|
|
}
|
|
|
|
run_rc_command "$1"
|