diff --git a/data/hooks/conf_regen/15-nginx b/data/hooks/conf_regen/15-nginx index 5bc5d4ab7..ea8f96da7 100644 --- a/data/hooks/conf_regen/15-nginx +++ b/data/hooks/conf_regen/15-nginx @@ -68,12 +68,12 @@ if [ -f /etc/yunohost/installed ]; then | sed 's|.conf||') [[ $domain_list =~ $domain ]] \ || ([[ $(sudo yunohost service saferemove -s nginx $file) == "True" ]] \ - && (rm -r /etc/nginx/conf.d/$domain.d || true)) + && (sudo rm -r /etc/nginx/conf.d/$domain.d || true)) done else [ ! -f /etc/nginx/sites-available/default ] \ - || rm -f /etc/nginx/sites-enabled/default + || sudo rm -f /etc/nginx/sites-enabled/default need_restart=True fi