Package postgresql9.4-server: Скрипты

Post install

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
Pre install

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
Pre uninstall

1
2
3
4
/usr/sbin/preun_service postgresql

# $2, holds the number of instances of the target package that will remain
# after the operation if $2 is 0, the target package will be removed