Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > d0fdb660c2f6116a1c80b39955122c9b > scriptlet

thttpd-2.25b-8.amd64.rpm

PREIN

/bin/sh

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

POSTIN

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

POSTUN

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