Sophie

Sophie

distrib > Scientific%20Linux > 5x > i386 > by-pkgid > 8231bf311c851d2cc5e1384e874e1a2e > scriptlet

postgresql-server-8.1.23-10.el5_10.i386.rpm

PREIN

/bin/sh
groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
useradd -M -n -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
	-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :

# If we're upgrading from rh-postgresql, we have to repeat the above actions
# after rh-postgresql-server is uninstalled, because its postun script runs
# after our pre script ...

PREUN

/bin/sh
if [ $1 = 0 ] ; then
	/sbin/service postgresql condstop >/dev/null 2>&1
	chkconfig --del postgresql
fi

POSTIN

/bin/sh
chkconfig --add postgresql
/sbin/ldconfig

POSTUN

/bin/sh
/sbin/ldconfig 
if [ $1 -ge 1 ] ; then
	/sbin/service postgresql condrestart >/dev/null 2>&1 || :
fi
if [ $1 = 0 ] ; then
	userdel postgres >/dev/null 2>&1 || :
	groupdel postgres >/dev/null 2>&1 || : 
fi

Triggers

rh-postgresql-server

/bin/sh
groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
useradd -M -n -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
	-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :