caddy/dist/init/linux-sysvinit
Andreas Ulm 8a326d4dc1 implemented sourcing of default file for sysvinit (#1984)
* implemented source of default file for sysvinit

Signed-off-by: root360-AndreasUlm <andreas.ulm@root360.de>

* added documentation in README

Signed-off-by: root360-AndreasUlm <andreas.ulm@root360.de>

* fixed sourcing command for sh

Signed-off-by: root360-AndreasUlm <andreas.ulm@root360.de>

* implemented source of default file for sysvinit

Signed-off-by: root360-AndreasUlm <andreas.ulm@root360.de>

* added documentation in README

Signed-off-by: root360-AndreasUlm <andreas.ulm@root360.de>

* fixed sourcing command for sh

Signed-off-by: root360-AndreasUlm <andreas.ulm@root360.de>

* implemented DAEMONOPTS overwrite

Signed-off-by: root360-AndreasUlm <andreas.ulm@root360.de>
2018-01-15 18:22:53 -07:00
..
caddy implemented sourcing of default file for sysvinit (#1984) 2018-01-15 18:22:53 -07:00
README.md implemented sourcing of default file for sysvinit (#1984) 2018-01-15 18:22:53 -07: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.

Init script manipulation

The init script supports configuration via the following files:

The following variables can be changed:

  • DAEMON: path to the caddy binary file (default: /usr/local/bin/caddy)
  • DAEMONUSER: user used to run caddy (default: www-data)
  • PIDFILE: path to the pidfile (default: /var/run/$NAME.pid)
  • LOGFILE: path to the log file for caddy daemon (not for access logs) (default: /var/log/$NAME.log)
  • CONFIGFILE: path to the caddy configuration file (default: /etc/caddy/Caddyfile)
  • CADDYPATH: path for SSL certificates managed by caddy (default: /etc/ssl/caddy)
  • ULIMIT: open files limit (default: 8192)