Sophie

Sophie

distrib > PLD > ra > i686 > media > dist > by-pkgid > 482026a71a691139e12ce5d12eeecaf2 > scriptlet

icecast-1.3.12-2.i686.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
	 /usr/sbin/groupadd -g 57 -r -f icecast
fi
if [ -n "`/bin/id -u icecast 2>/dev/null`" ]; then
	if [ "`/usr/bin/getgid icecast`" != "57" ]; then
		echo "Error: user icecast doesn't have uid=57. Correct this before installing icecast." 1>&2
		exit 1
	fi
else
	/usr/sbin/useradd -u 57 -r -d /dev/null -s /bin/false -c "Streamcast" -g icecast icecast 1>&2
fi

PREUN

/bin/sh
if [ "$1" = "0" ] ; then
	if [ -f /var/lock/subsys/icecast ]; then
		/etc/rc.d/init.d/icecast stop >&2
	fi
	/sbin/chkconfig --del icecast >&2
fi

POSTIN

/bin/sh
chkconfig --add icecast
if [ -f /var/lock/subsys/icecast ]; then
	/etc/rc.d/init.d/icecast restart >&2
else
	echo "Run '/etc/rc.d/init.d/icecast start' to start icecast deamon." >&2
fi

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
	/usr/sbin/userdel icecast 2>/dev/null
	/usr/sbin/groupdel icecast 2>/dev/null
fi