Argh. I forgot that "$pidfile" has a special meaning to rc.subr, so
fix the error introduced in the last revision. Generalize this, and command to make the sample code more reusable.
This commit is contained in:
parent
1b8b9828d0
commit
4e5ee22bd0
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=27882
1 changed files with 4 additions and 3 deletions
|
@ -6047,14 +6047,15 @@ USE_SDL+= mixer
|
|||
name="doormand"
|
||||
rcvar=${name}_enable
|
||||
|
||||
command=%%PREFIX%%/sbin/${name}
|
||||
pidfile=/var/run/${name}.pid
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${doormand_enable="NO"}
|
||||
: ${doormand_config="%%PREFIX%%/etc/doormand/doormand.cf"}
|
||||
: ${doormand_pidfile=/var/run/doormand.pid}
|
||||
|
||||
command=%%PREFIX%%/sbin/doormand
|
||||
command_args="-p $doormand_pidfile -f $doormand_config"
|
||||
command_args="-p $pidfile -f $doormand_config"
|
||||
|
||||
run_rc_command "$1"</programlisting>
|
||||
|
||||
|
|
Loading…
Reference in a new issue