change sudo to work stack-panel way

This commit is contained in:
Matthew Saunders Brown 2024-02-06 10:30:35 -08:00
parent cd39bfc95b
commit fa6719db54

View File

@ -8,8 +8,8 @@
# powerdns-tools include file, used by other powerdns-tools bash scripts # powerdns-tools include file, used by other powerdns-tools bash scripts
# Must be root, attempt sudo if need be. root is not actually required for the API commands, but we want to restrict access. # Must be root, attempt sudo if need be. root is not actually required for the API commands, but we want to restrict access.
if [ "${EUID}" -ne 0 ]; then if [ "$USER" != "root" ]; then
exec sudo -u root --shell /bin/bash $0 $@ exec sudo -u root $0 $@
fi fi
# Load local config # Load local config