1 2 3 4 5 6
echo PGLIB=/usr/share/pgsql >> ~postgres/.bash_profile echo PGDATA=/var/lib/pgsql/data >> ~postgres/.bash_profile echo export PGLIB PGDATA >> ~postgres/.bash_profile chown postgres:postgres ~postgres/.bash_profile /usr/sbin/post_service postgresql
1 2 3 4 5 6 7 8 9 10
exec &>/dev/null if [ $1 -gt 1 ] then if [ ! -d /usr/lib/pgsql/backup ]; then mkdir -p /usr/lib/pgsql/backup fi cd /usr/bin cp -fp postmaster postgres /usr/lib/pgsql/backup fi
1
/usr/sbin/preun_service postgresql