You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/sh
# PROVIDE: acmed # REQUIRE: LOGIN cleanvar # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable acmed: # acmed_enable (bool): Set it to "YES" to enable ACMEd. # Default is "NO". # acmed_config (string): Path to ACMEd configuration file. # Default is "%%PREFIX%%/etc/acmed/acmed.toml". # acmed_log_level (string): Set the log verbosity level. # Possible values are "error", "warn", "info", # "debug" and "trace". # Default is "info". # acmed_flags (string): Additional flags to be passed to acmed. # Default is "--log-syslog". #
. /etc/rc.subr
name="acmed" rcvar="${name}_enable"
load_rc_config "$name" : ${acmed_enable:="NO"} : ${acmed_config:="%%PREFIX%%/etc/acmed/acmed.toml"} : ${acmed_log_level:="info"} : ${acmed_flags:="--log-syslog"}
pidfile="/var/run/${name}.pid"
command="/usr/local/bin/${name}" command_args="--config ${acmed_config} --pid-file ${pidfile} --log-level ${acmed_log_level} ${command_args}" required_files="${acmed_config}"
run_rc_command "$1"
|