0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

Merge pull request #1541 from lucafavatella/review-certs-dir

init: Make CADDYPATH equal across init scripts
This commit is contained in:
Matt Holt 2017-03-31 12:45:56 -06:00 committed by GitHub
commit 6be0386716
5 changed files with 8 additions and 8 deletions

View file

@ -6,6 +6,6 @@ Usage
* Download the appropriate Caddy binary in `/usr/local/bin/caddy` or use `curl https://getcaddy.com | bash`.
* Save the SysVinit config file in `/etc/init.d/caddy`.
* Ensure that the folder `/etc/caddy` exists and that the subfolder `ssl` is owned by `www-data`.
* Ensure that the folder `/etc/caddy` exists and that the folder `/etc/ssl/caddy` is owned by `www-data`.
* Create a Caddyfile in `/etc/caddy/Caddyfile`
* Now you can use `service caddy start|stop|restart|reload|status` as `root`.

View file

@ -28,7 +28,7 @@ STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/5/KILL/5}"
test -x $DAEMON || exit 0
# Set the CADDYPATH; Let's Encrypt certificates will be written to this directory.
export CADDYPATH=/etc/caddy/ssl
export CADDYPATH=/etc/ssl/caddy
# Set the ulimits
ulimit -n 8192

View file

@ -14,12 +14,12 @@ respawn limit 10 5
reload signal SIGUSR1
# Let's Encrypt certificates will be written to this directory.
env CADDYPATH=/etc/caddy
env CADDYPATH=/etc/ssl/caddy
limit nofile 1048576 1048576
script
cd /etc/caddy
cd /etc/ssl/caddy
rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
end script

View file

@ -17,12 +17,12 @@ respawn limit 10 5
reload signal SIGUSR1
# Let's Encrypt certificates will be written to this directory.
env CADDYPATH=/etc/caddy
env CADDYPATH=/etc/ssl/caddy
limit nofile 1048576 1048576
script
cd /etc/caddy
cd /etc/ssl/caddy
rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
end script

View file

@ -15,12 +15,12 @@ respawn limit 10 5
#reload signal SIGUSR1
# Let's Encrypt certificates will be written to this directory.
env CADDYPATH=/etc/caddy
env CADDYPATH=/etc/ssl/caddy
limit nofile 1048576 1048576
script
cd /etc/caddy
cd /etc/ssl/caddy
rootdir="$(mktemp -d -t "caddy-run.XXXXXX")"
exec /usr/local/bin/caddy -agree -log=stdout -conf=/etc/caddy/Caddyfile -root=$rootdir
end script