Base file
This is all that remains of the V1 script after superfluous code has been removed and minor code tweaks made.master
parent
d88f6ec203
commit
ea7717d6c6
23
caddy
23
caddy
|
@ -27,28 +27,7 @@ load_rc_config ${name}
|
|||
: ${caddy_bin_path="/usr/local/bin/caddy"}
|
||||
: ${caddy_config_path="/usr/local/www/Caddyfile"}
|
||||
|
||||
if [ "$caddy_cert_email" = "" ]
|
||||
then
|
||||
echo "rc variable \$caddy_cert_email is not set. Please provide a valid SSL certificate issuer email."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pidfile="/var/run/${name}.pid"
|
||||
procname="${caddy_bin_path}" #enabled builtin pid checking for start / stop
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-p ${pidfile} -T ${name} -l ${caddy_syslog_facility} -s ${caddy_syslog_level} /usr/bin/env ${caddy_env} ${procname} ${caddy_options} < /dev/null"
|
||||
|
||||
start_precmd="caddy_startprecmd"
|
||||
|
||||
caddy_startprecmd()
|
||||
{
|
||||
# Clear flags provided by caddy_flags to prevent them being passed to daemon(8)
|
||||
rc_flags=""
|
||||
|
||||
if [ ! -e "${pidfile}" ]; then
|
||||
install -o "${caddy_user}" -g "${caddy_group}" "/dev/null" "${pidfile}"
|
||||
fi
|
||||
}
|
||||
command="${caddy_bin_path}"
|
||||
|
||||
required_files="${caddy_config_path}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue