mirror of https://gitlab.com/curben/blog
post(caddy-2): must use "caddy reload" to reload config
- ce8860dbfe/init/caddy.service (L25)
This commit is contained in:
parent
e12bca5baa
commit
86c5649e74
|
@ -2,6 +2,7 @@
|
|||
title: Running Caddy 2 in NixOS 20.03
|
||||
excerpt: Use stable v2 instead of beta release
|
||||
date: 2020-05-24
|
||||
updated: 2020-08-30
|
||||
tags:
|
||||
- server
|
||||
- caddy
|
||||
|
@ -84,6 +85,11 @@ in {
|
|||
'' else ''
|
||||
${cfg.package}/bin/caddy -root=/var/tmp -conf=${cfg.config}
|
||||
'';
|
||||
ExecReload = if isCaddy2 then ''
|
||||
${cfg.package}/bin/caddy reload --config ${cfg.config} --adapter ${cfg.adapter}
|
||||
'' else ''
|
||||
"${pkgs.coreutils}/bin/kill -HUP $MAINPID"
|
||||
'';
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
Type = "simple";
|
||||
User = "caddy";
|
||||
|
|
Loading…
Reference in New Issue