rc.d/ggated: Simplify service script
- Use the standard *_flags variable for additional flags.
- Style: do not create unnecessary variables
- Do not set the defaults in the service script. This is what
/etc/defaults/rc.conf is for.
- Do not set additional flags via commands_args. ggated_flags are
already included in the final invocation. See rc.subr(8) for details.
- Document the meaning of ggated_config in /etc/defaults/rc.conf.
Approved by: eugen (src)
Fixes: c068632981
Add ggated rc script
Differential Revision: https://reviews.freebsd.org/D34439
This commit is contained in:
parent
dd74471e49
commit
c1a76c0486
@ -297,8 +297,8 @@ hastd_enable="NO" # Run the HAST daemon (YES/NO).
|
|||||||
hastd_program="/sbin/hastd" # path to hastd, if you want a different one.
|
hastd_program="/sbin/hastd" # path to hastd, if you want a different one.
|
||||||
hastd_flags="" # Optional flags to hastd.
|
hastd_flags="" # Optional flags to hastd.
|
||||||
ggated_enable="NO" # Run the ggate daemon (YES/NO).
|
ggated_enable="NO" # Run the ggate daemon (YES/NO).
|
||||||
ggated_config="/etc/gg.exports"
|
ggated_config="/etc/gg.exports" # ggated(8) exports file.
|
||||||
ggated_params="" # Extra parameters like which port to bind to.
|
ggated_flags="" # Extra parameters like which port to bind to.
|
||||||
ctld_enable="NO" # CAM Target Layer / iSCSI target daemon.
|
ctld_enable="NO" # CAM Target Layer / iSCSI target daemon.
|
||||||
local_unbound_enable="NO" # Local caching resolver
|
local_unbound_enable="NO" # Local caching resolver
|
||||||
local_unbound_tls="NO" # Use DNS over TLS
|
local_unbound_tls="NO" # Use DNS over TLS
|
||||||
|
@ -12,10 +12,8 @@ command="/sbin/${name}"
|
|||||||
pidfile="/var/run/${name}.pid"
|
pidfile="/var/run/${name}.pid"
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
params="${ggated_params}"
|
required_files="${ggated_config}"
|
||||||
config="${ggated_config:-/etc/gg.exports}"
|
|
||||||
required_files="${config}"
|
|
||||||
|
|
||||||
command_args="${params} ${config}"
|
command_args="${ggated_config}"
|
||||||
|
|
||||||
run_rc_command "$1"
|
run_rc_command "$1"
|
||||||
|
Loading…
Reference in New Issue
Block a user