fix dashes on the name and better error handling (#336)

This commit is contained in:
Saeed Vaziry
2024-11-02 22:44:02 +01:00
committed by GitHub
parent f743611b22
commit 6639fac9c0
16 changed files with 53 additions and 96 deletions

View File

@ -4,7 +4,7 @@ DATABASES=$(sudo -u postgres psql -t -c "SELECT datname FROM pg_database WHERE d
for DB in $DATABASES; do
echo "Revoking privileges in database: $DB"
sudo -u postgres psql -d "$DB" -c "REVOKE ALL PRIVILEGES ON DATABASE \"$DB\" FROM $USER_TO_REVOKE;"
sudo -u postgres psql -d "$DB" -c "REVOKE ALL PRIVILEGES ON DATABASE \"$DB\" FROM \"$USER_TO_REVOKE\";"
done
echo "Privileges revoked from $USER_TO_REVOKE"