#!/sbin/openrc-run # Distributed under the terms of the GNU General Public License v2 depend() { after net } start(){ ebegin "Starting Caddy Web Server" start-stop-daemon --start -b \ --make-pidfile \ --pidfile /run/${RC_SVCNAME}.pid \ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \ --exec /usr/bin/${RC_SVCNAME} -- ${CADDY_ARGS} eend $? } stop() { ebegin "Stopping Caddy Web Server" start-stop-daemon --stop \ --pidfile /run/${RC_SVCNAME}.pid \ --retry=TERM/20/KILL/5 eend $? }