Sophie

Sophie

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

mythtv-backend-0.19-5.amd64.rpm

PREIN

/bin/sh

 
 
if [ -n "`/usr/bin/getgid mythtv`" ]; then 
	if [ "`/usr/bin/getgid mythtv`" != "149" ]; then 
		echo "Error: group mythtv doesn't have gid=149. Correct this before installing mythtv." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding group mythtv GID=149." 
	/usr/sbin/groupadd -g 149 -r mythtv 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : 
fi;
 
 
 
if [ -n "`/bin/id -u mythtv 2>/dev/null`" ]; then 
	if [ "`/bin/id -u mythtv`" != "149" ]; then 
		echo "Error: user mythtv doesn't have uid=149. Correct this before installing mythtv." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding user mythtv UID=149." 
	/usr/sbin/useradd \
		 \
		-u 149 \
		-r \
		-d /var/lib/mythtv \
		-s /bin/false \
		-c "MythTV User"\
		-g mythtv \
		 \
		 \
		mythtv 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || : 
fi;/usr/lib/rpm/user_group.sh user addtogroup mythtv video
/usr/lib/rpm/user_group.sh user addtogroup mythtv audio

PREUN

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

POSTIN

/bin/sh
/sbin/chkconfig --add mythbackend

POSTUN

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