fix: use preun instead of postun
All checks were successful
Continuous Integration / lint_n_build (push) Successful in 35s
Continuous Delivery / build_n_upload (push) Successful in 36s

This commit is contained in:
2026-06-25 14:44:51 +02:00
parent 37a5cf94b2
commit edbfafd951

View File

@@ -74,7 +74,7 @@ systemctl daemon-reload
systemctl reenable nginx.service php-fpm.service
systemctl restart nginx.service php-fpm.service
%postun
%preun
# Display commands and exit on error
set -xe
@@ -89,6 +89,7 @@ if [ $1 == 0 ]; then
if runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet nextcloud; then
runuser --user=postgres -- dropuser nextcloud
fi
rm --force /etc/nextcloud/config.php
rm --recursive --force /var/www/nextcloud
fi