Solve the problem mentioned in the PR a slightly different way. Assign
default values to variables before they are used to make a better (and working!) example. While I'm hear, switch to $name_pidfile to make it more clear how one might go about adding that type of variable to a script. PR: docs/93621 Submitted by: NIIMI Satoshi <sa2c@sa2c.net>
This commit is contained in:
parent
6a1e0cd365
commit
48173bd362
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=27872
1 changed files with 4 additions and 4 deletions
|
@ -6047,14 +6047,14 @@ USE_SDL+= mixer
|
|||
name="doormand"
|
||||
rcvar=${name}_enable
|
||||
|
||||
command=%%PREFIX%%/sbin/doormand
|
||||
command_args="-p $pidfile -f $doormand_config"
|
||||
pidfile=/var/run/doormand.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"
|
||||
|
||||
run_rc_command "$1"</programlisting>
|
||||
|
||||
|
|
Loading…
Reference in a new issue