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.
30 lines
564 B
Bash
30 lines
564 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: nxagentd
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
#
|
|
#
|
|
# Add the following line to /etc/rc.conf[.local] to enable nxagentd
|
|
#
|
|
# nxagentd_enable (bool): Set to "NO" by default.
|
|
# Set it to "YES" to enable nxagentd.
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="nxagentd"
|
|
nxagentd_user="netxms"
|
|
rcvar=nxagentd_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${nxagentd_enable="NO"}
|
|
|
|
command="%%PREFIX%%/bin/nxagentd"
|
|
required_files="%%PREFIX%%/etc/nxagentd.conf"
|
|
command_args="-c %%PREFIX%%/etc/nxagentd.conf -d"
|
|
|
|
run_rc_command "$1"
|