Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 56f0d7cb00155fad9166eafe2538fc84 > scriptlet

up-imapproxy-1.2.4-5.amd64.rpm

PREIN

/bin/sh

 
 
if [ -n "`/usr/bin/getgid imapproxy`" ]; then 
	if [ "`/usr/bin/getgid imapproxy`" != "150" ]; then 
		echo "Error: group imapproxy doesn't have gid=150. Correct this before installing up-imapproxy." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding group imapproxy GID=150." 
	/usr/sbin/groupadd -g 150 -r imapproxy 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : 
fi;
 
 
 
if [ -n "`/bin/id -u imapproxy 2>/dev/null`" ]; then 
	if [ "`/bin/id -u imapproxy`" != "150" ]; then 
		echo "Error: user imapproxy doesn't have uid=150. Correct this before installing up-imapproxy." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding user imapproxy UID=150." 
	/usr/sbin/useradd \
		 \
		-u 150 \
		-r \
		-d /usr/share/empty \
		-s /bin/false \
		-c "IMAP proxy daemon"\
		-g imapproxy \
		 \
		 \
		imapproxy 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/imapproxy ]; then
/sbin/service imapproxy stop 1>&2 || :;
fi };	/sbin/chkconfig --del imapproxy
fi

POSTIN

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

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
	/usr/lib/rpm/user_group.sh user del imapproxy
	/usr/lib/rpm/user_group.sh group del imapproxy
fi