Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 4046c207463a740a0a187c3d53d62abe > scriptlet

icecast-2.3.1-5.amd64.rpm

PREIN

/bin/sh

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

POSTIN

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

POSTUN

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