bin/edconf: check and reload nginx config with sudo

This commit is contained in:
xeruf 2022-03-14 21:59:23 +00:00
parent e239d2f554
commit 35507d97d9
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ case "$sel" in
(/etc/fstab) sudoedit "$sel" && sudo findmnt --verify;;
(/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/nginx/*) sudoedit "$sel" && sudo nginx -t && sudo nginx -s reload;;
(/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";;