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.
32 lines
774 B
Bash
32 lines
774 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: kumofs-gateway
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# kumofs_gateway_enable="YES"
|
|
# kumofs_gateway_addr="client1"
|
|
# kumofs_gateway_manager_local_addr="manager1"
|
|
# kumofs_gateway_manager_partner_addr="manager2"
|
|
# kumofs_gateway_extra_flags="-v -t 11411"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="kumofs_gateway"
|
|
rcvar=kumofs_gateway_enable
|
|
|
|
load_rc_config $name
|
|
|
|
# Set defaults
|
|
: ${kumofs_gateway_enable="NO"}
|
|
: ${kumofs_gateway_pid="/var/run/kumofs/gateway.pid"}
|
|
: ${kumofs_gateway_flags="-m ${kumofs_gateway_manager_local_addr} -p ${kumofs_gateway_manager_partner_addr} -d ${kumofs_gateway_pid} -o /var/log/kumofs/gateway.log ${kumofs_gateway_extra_flags}"}
|
|
: ${kumofs_gateway_user="kumofs"}
|
|
|
|
command=%%PREFIX%%/bin/kumo-gateway
|
|
|
|
run_rc_command "$1"
|