#!/bin/bash
source $HOME/.gamerc

for GAMEDB in $(find $HOME/servers* -maxdepth 1 -type f -name "setup.ini" -exec grep "^GameDB=" {} + | cut -d= -f2); do
    echo "${GAMEDB}"
    psql -U postgres ${GAMEDB} -c "UPDATE player_characters SET privilege = 5;"
done
