Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 04165e7f1d6e9d9a75c6f240626b8ffc > scriptlet

slony1-1.1.6-1.amd64.rpm

PREIN

/bin/sh

 
 
if [ -n "`/usr/bin/getgid slony1`" ]; then 
	if [ "`/usr/bin/getgid slony1`" != "131" ]; then 
		echo "Error: group slony1 doesn't have gid=131. Correct this before installing slony1." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding group slony1 GID=131." 
	/usr/sbin/groupadd -g 131 -r slony1 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : 
fi;
 
 
 
if [ -n "`/bin/id -u slony1 2>/dev/null`" ]; then 
	if [ "`/bin/id -u slony1`" != "131" ]; then 
		echo "Error: user slony1 doesn't have uid=131. Correct this before installing slony1." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding user slony1 UID=131." 
	/usr/sbin/useradd \
		 \
		-u 131 \
		-r \
		-d /home/services/slony1 \
		-s /bin/sh \
		-c "Slony-I Replicator"\
		-g slony1 \
		-M \
		 \
		slony1 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || : 
fi;

PREUN

/bin/sh
if [ "$1" = "0" ]; then
	{
if [ -f /var/lock/subsys/slony1 ]; then
/sbin/service slony1 stop 1>&2 || :;
fi };	/sbin/chkconfig --del slony1
fi

POSTIN

/bin/sh
/sbin/chkconfig --add slony1
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/slony1 ] && . /etc/sysconfig/slony1
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/slony1 ]; then
/sbin/service slony1 restart 1>&2 || :;
else
echo 'Run "/sbin/service slony1 start" to start slony1 replicator.'
fi
fi };