Sophie

Sophie

distrib > Arklinux > devel > i586 > media > main > by-pkgid > 870413996e040b2de3b12ff660f5d19f > scriptlet

postgresql-server-9.0.2-1ark.i586.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 || :
touch /var/log/pgsql
chown postgres.postgres /var/log/pgsql
chmod 0700 /var/log/pgsql

PREUN

/bin/sh
if [ $1 = 0 ] ; then
	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