Sophie

Sophie

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

amavis-ng-0.1.6.9-3.amd64.rpm

PREIN

/bin/sh
if [ "$1" = "1" ]; then
	echo
	echo 'Type "info amavis-ng" to get help'
	echo
fi


 
 
if [ -n "`/usr/bin/getgid amavis`" ]; then 
	if [ "`/usr/bin/getgid amavis`" != "97" ]; then 
		echo "Error: group amavis doesn't have gid=97. Correct this before installing amavis-ng." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding group amavis GID=97." 
	/usr/sbin/groupadd -g 97 -r amavis 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : 
fi;
 
 
 
if [ -n "`/bin/id -u amavis 2>/dev/null`" ]; then 
	if [ "`/bin/id -u amavis`" != "97" ]; then 
		echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis-ng." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding user amavis UID=97." 
	/usr/sbin/useradd \
		 \
		-u 97 \
		-r \
		-d /var/spool/amavis \
		-s /bin/false \
		-c "Anti Virus Checker"\
		-g nobody \
		 \
		 \
		amavis 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || : 
fi;

POSTUN

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

Triggers

courier

/bin/sh
chown -R daemon /var/{spool,log}/amavis-ng
if [ -f /var/lock/subsys/courier ]; then
	/usr/sbin/filterctl stop perlfilter
	/usr/sbin/filterctl start perlfilter
fi