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
|
title: Running Caddy 2 in NixOS 20.03
|
||||||
excerpt: Use stable v2 instead of beta release
|
excerpt: Use stable v2 instead of beta release
|
||||||
date: 2020-05-24
|
date: 2020-05-24
|
||||||
|
updated: 2020-08-30
|
||||||
tags:
|
tags:
|
||||||
- server
|
- server
|
||||||
- caddy
|
- caddy
|
||||||
|
@ -84,6 +85,11 @@ in {
|
||||||
'' else ''
|
'' else ''
|
||||||
${cfg.package}/bin/caddy -root=/var/tmp -conf=${cfg.config}
|
${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";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "caddy";
|
User = "caddy";
|
||||||
|
|
Loading…
Reference in New Issue