Update caddy reload command paths in configuration and panelctl scripts

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Jakub Dorfman 2026-04-26 23:31:31 +02:00
parent 7072fc9a37
commit 64c5b573cf
3 changed files with 4 additions and 3 deletions

View file

@ -3,8 +3,9 @@
services.caddy = { services.caddy = {
enable = true; enable = true;
email = "admin@srazka.com"; email = "admin@srazka.com";
# Generated app routes from the panel backend.
extraConfig = '' extraConfig = ''
# Generated app routes from the panel backend.
import /var/lib/containers/routes/routes.caddy import /var/lib/containers/routes/routes.caddy
''; '';

View file

@ -84,7 +84,7 @@
users = [ "reudy" ]; users = [ "reudy" ];
commands = [ commands = [
{ {
command = "${pkgs.systemd}/bin/systemctl reload caddy"; command = "/run/current-system/sw/bin/systemctl reload caddy";
options = [ "NOPASSWD" ]; options = [ "NOPASSWD" ];
} }
]; ];

View file

@ -287,7 +287,7 @@ maybe_reload_caddy() {
fi fi
if command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then if command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
sudo -n systemctl reload caddy sudo -n /run/current-system/sw/bin/systemctl reload caddy
echo "reloaded caddy via sudo" echo "reloaded caddy via sudo"
return return
fi fi