35 lines
860 B
SYSTEMD
35 lines
860 B
SYSTEMD
# This service originally copied from:
|
|
# https://raw.githubusercontent.com/caddyserver/dist/master/init/caddy.service
|
|
|
|
# caddy.service
|
|
#
|
|
# For using Caddy with a config file.
|
|
#
|
|
# Make sure the ExecStart and ExecReload commands are correct
|
|
# for your installation.
|
|
#
|
|
# See https://caddyserver.com/docs/install for instructions.
|
|
|
|
[Unit]
|
|
Description=Caddy
|
|
Documentation=https://caddyserver.com/docs/
|
|
After=network.target network-online.target
|
|
Requires=network-online.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
User=caddy
|
|
Group=caddy
|
|
ExecStart=/usr/bin/caddy run --config /home/caddy/Caddyfile
|
|
ExecReload=/usr/bin/caddy reload --config /home/caddy/Caddyfile
|
|
TimeoutStopSec=5s
|
|
LimitNOFILE=1048576
|
|
LimitNPROC=512
|
|
PrivateTmp=true
|
|
ProtectSystem=full
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
ExecStopPost=/home/hmn/hmn/server/adminmailer.sh %n
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|