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