0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-30 22:34:15 -05:00
caddy/dist/init/linux-sysvinit
Tim Lewis a808252079 Fix spurious .pid file error in linux-sysvinit
This change eliminates the `[ERROR] Could not write pidfile: open /var/run/caddy.pid: permission denied` from caddy.log.
The start-stop-daemon writes the file as root so the DAEMONUSER that caddy runs as cannot write to the .pid file.
2017-09-18 19:14:56 -04:00
..
caddy Fix spurious .pid file error in linux-sysvinit 2017-09-18 19:14:56 -04:00
README.md Make CADDYPATH equal across init scripts 2017-03-28 22:04:19 +01:00

SysVinit conf for Caddy

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 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.