Commit 86854dca authored by MathiasB's avatar MathiasB

dist/init: caddy.conf for upstart

parent b3a5b725
Upstart conf for Caddy
=====================
Usage
-----
Usage in this blogpost: [Running Caddy Server as a service with Upstart](https://denbeke.be/blog/servers/running-caddy-server-as-a-service/).
Short recap:
* Download Caddy in `/usr/bin/caddy` and execute `sudo setcap cap_net_bind_service=+ep /usr/bin/caddy`.
* Save the upstart config file in `/etc/init/caddy.conf`.
* Create a Caddyfile in `/etc/caddy/Caddyfile`.
* Now you can use `sudo service caddy start|stop|restart`.
\ No newline at end of file
description "Caddy startup script"
author "Mathias Beke"
start on runlevel [2345]
stop on runlevel [016]
setuid www-data
setgid www-data
respawn
respawn limit 10 5
limit nofile 4096 4096
script
exec /usr/bin/caddy -agree=true -conf=/etc/caddy/Caddyfile
end script
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment