2016-06-06 21:32:27 +08:00
|
|
|
description "Caddy HTTP/2 web server"
|
2016-03-31 20:36:44 +08:00
|
|
|
|
|
|
|
start on runlevel [2345]
|
|
|
|
stop on runlevel [016]
|
|
|
|
|
2016-06-06 21:32:27 +08:00
|
|
|
console log
|
2016-03-31 20:36:44 +08:00
|
|
|
|
|
|
|
setuid www-data
|
|
|
|
setgid www-data
|
|
|
|
|
|
|
|
respawn
|
|
|
|
respawn limit 10 5
|
|
|
|
|
2016-06-06 21:32:27 +08:00
|
|
|
# Let's Encrypt certificates will be written to this directory.
|
|
|
|
env HOME=/etc/caddy
|
|
|
|
|
|
|
|
limit nofile 1048576 1048576
|
2016-03-31 20:36:44 +08:00
|
|
|
|
|
|
|
script
|
2016-06-06 21:32:27 +08:00
|
|
|
cd /etc/caddy
|
|
|
|
rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
|
|
|
|
exec /usr/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
|
|
|
|
end script
|