post_thaw script (PostgreSQL)

#!/bin/sh
#post-thaw-script
date >> '/scripts/post_root.log'
echo -e "\n attempting to run post-thaw script for PostgrSQL as root user\n" >> /scripts/post_root.log
if [ "$(id -u)" -eq "0" ]; then
python '/scripts/unquiesce.py'
if [ $? -ne 0 ]
then
date >> '/scripts/post_root.log'
echo -e "\n Unable to unquiesce PostgrSQL DB\n" >> '/scripts/post_root.log'
exit 1
fi
echo -e "\n Database is in unquiesce mode now\n" >> /scripts/post_root.log
else
date >> '/scripts/post_root.log'
echo -e "not root user\n" >> '/scripts/post_root.log'
fi

Loading...