blob: 775365e846d01285fe8f891aa3717ea6c8c02ea7 (
plain) (
blame)
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
32
|
#!/bin/sh
# PROVIDE: nginx_ui
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Configuration settings for NGINX UI in /etc/rc.conf
#
# nginx_ui_enable (bool): Enable NGINX UI. (default=NO)
# nginx_ui_log (str): Log output. (default=/var/log/nginx-ui.log)
# nginx_ui_runas (str): User to run NGINX UI as. (default=%%USER%%)
#
. /etc/rc.subr
name="nginx_ui"
desc="Yet another WebUI for Nginx"
rcvar="${name}_enable"
load_rc_config $name
: ${nginx_ui_enable:="NO"}
: ${nginx_ui_log:="/var/log/nginx-ui.log"}
: ${nginx_ui_runas:="%%USER%%"}
nginx_ui_chdir="/var/db/nginx-ui"
pidfile="/var/run/nginx-ui.pid"
procname="%%LOCALBASE%%/bin/nginx-ui"
command="/usr/sbin/daemon"
command_args="-o ${nginx_ui_log} -u ${nginx_ui_runas} -p ${pidfile} -t \"${desc}\" ${procname}"
run_rc_command "$1"
|