%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart mysql
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart nginx
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart varnish
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart elasticsearch
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart haproxy
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart lsyncd-data
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart opensearch
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart rabbitmq-server
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart php*-fpm
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload php*-fpm
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart redis-server
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart redis-server-persistent
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart valkey-server
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart valkey-server-persistent
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart supervisor
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart rootless_docker
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl restart techaro-botstopper@*
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload mysql
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload nginx
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload varnish
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/systemctl reload supervisor
%hn-priv ALL=(ALL) NOPASSWD:/usr/bin/nginx_config_reloader
%hn-priv ALL=(ALL) NOPASSWD:/bin/chown root\:hn-priv /var/cache/managed_vhosts/tmp_file_????????
%hn-priv ALL=(ALL) NOPASSWD:/bin/mv /var/cache/managed_vhosts/tmp_file_???????? /etc/nginx/sites/*.conf
%hn-priv ALL=(ALL) NOPASSWD:/bin/mv /var/cache/managed_vhosts/tmp_file_???????? /data/var/statefiles/nginx_vhosts.json
%hn-priv ALL=(ALL) NOPASSWD:/bin/mv /var/cache/managed_vhosts/tmp_file_???????? /data/shared/var/statefiles/nginx_vhosts.json

# So hypernode-postsuper can clear the mail queue
%hn-priv ALL=(ALL) NOPASSWD:/usr/sbin/postsuper -d ALL
%hn-priv ALL=(ALL) NOPASSWD:/usr/sbin/postsuper -v -d ALL

# So hypernode-postsuper can delete individual mails in queue
# The "-d -" param is so that postsuper reads queue_id from stdin
# just the bare "-d" would not work
%hn-priv ALL=(ALL) NOPASSWD:/usr/sbin/postsuper -d -
%hn-priv ALL=(ALL) NOPASSWD:/usr/sbin/postsuper -v -d -

# Unoomkillable command
%hn-priv ALL=(ALL) NOPASSWD:/usr/sbin/hypernode_oom_protect_wrapper [0-9][0-9]*
