From e8c2f0809f1b3151b5453c3f5cefcf637055b504 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 25 Jan 2022 14:02:13 +0100 Subject: [PATCH] bin/edconf: validate caddy config --- .local/bin/scripts/edconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/scripts/edconf b/.local/bin/scripts/edconf index 07f0dbd..da94351 100755 --- a/.local/bin/scripts/edconf +++ b/.local/bin/scripts/edconf @@ -27,7 +27,7 @@ case "$sel" in (/etc/default/grub) sudoedit "$sel" && sudo grub-mkconfig -o /boot/grub/grub.cfg;; (/etc/locale.gen) sudoedit "$sel" && sudo locale-gen;; (/etc/nginx/*) sudoedit "$sel" && nginx -t && nginx -s reload;; - (/etc/caddy/*) sudoedit "$sel" && sudo systemctl reload-or-restart caddy;; + (/etc/caddy/*) sudoedit "$sel" && caddy validate --config /etc/caddy/Caddyfile && sudo systemctl reload-or-restart caddy;; (/etc/ssh/*) sudoedit "$sel" && sudo systemctl reload-or-restart sshd;; (*) $(test -w "$sel" || echo sudo) "$EDITOR" "$sel";; esac