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.
23 lines
532 B
23 lines
532 B
#!/sbin/openrc-run
|
|
|
|
: ${caddy_opts:="--config {{ caddy_conf_file | quote }}"}
|
|
|
|
name="$SVCNAME"
|
|
directory="{{ caddy_conf_dir }}"
|
|
command="{{ (caddy_bin_dir, 'caddy') | path_join }}"
|
|
command_args="run --environ $caddy_opts"
|
|
command_user="{{ caddy_user ~ ':' ~ caddy_group }}"
|
|
pidfile="/var/run/$SVCNAME.pid"
|
|
command_background=true
|
|
extra_started_commands="reload"
|
|
|
|
depend() {
|
|
need net localmount
|
|
after firewall
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading $SVCNAME"
|
|
su ${command_user%:*} -s /bin/sh -c "$command reload $caddy_opts"
|
|
eend $?
|
|
}
|
|
|