83eb2c3700
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
35 lines
590 B
Bash
35 lines
590 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: sj3
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Define these sj3_* variables in one of these files:
|
|
# /etc/rc.conf
|
|
# /etc/rc.conf.local
|
|
# /etc/rc.conf.d/sj3
|
|
#
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
|
#
|
|
sj3_enable=${sj3_enable:-"NO"} # Enable sj3
|
|
#sj3_program="%%PREFIX%%/sbin/sj3serv" # Location of sj3
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="sj3"
|
|
rcvar=sj3_enable
|
|
command="%%PREFIX%%/sbin/sj3serv"
|
|
start_precmd="sj3serv_precmd"
|
|
|
|
sj3serv_precmd()
|
|
{
|
|
mkdir -p -m 0755 /var/run/sj3
|
|
chown _sj3:_sj3 /var/run/sj3
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|