...
Overall (several variants, read before execution)
No Format |
---|
# download cd /tmp#sudo apt-get install ca-certificates wget https://download.clazzes.org/pg_fix_usermappings/pg_fix_usermappings.sh#sh \ -O /tmp/pg_fix_usermappings.sh # make it executable, for user postgres chmod ugo+rx /tmp/pg_fix_usermappings.sh # it's safe to call the script without any parameters ... /tmp/pg_fix_usermappings.sh # think executeabout forversion 9.6 as root sudo -u postgres pg_fix_usermappings.sh 9.6 # orls -ld /etc/postgresql/* dpkg -l |egrep " postgresql-9.[0-9] " # execute for 9.6 as non- root sudologging sudothe -uoutput postgres pg_fix_usermappings.sh export MYPGVER=9.6 # or execute for 9.6 for the bold skipping do-you-really-want-it backcheck ( sudo sudo -u postgres /tmp/pg_fix_usermappings.sh --yes 9.6 # or execute logging the output ( sudo sudo -u postgres pg_fix_usermappings.sh 9.6 ) ${MYPGVER} ) \ 2>&1 |tee /var/tmp/pg_fix_usermappings_${MYPGVER}.log # after success maybe document sudo mv -v /tmp/pg_fix_usermappings.sh /var/tmp/pg_fix_usermappings*.log /var/log/postgresql/ |
...