Update configPG931.sh

moved the opening of ports before switching to user postgres and trying sudo su root to get out of postgres user