Sophie

Sophie

distrib > PLD > ra > i686 > media > dist > by-pkgid > 5a49e0ead805fd4c32e8dd1b21d82c2b > scriptlet

amavis-ng-0.1.4.1.orig-0.i686.rpm

PREIN

/bin/sh
if [ -n "`getgid amavis`" ]; then
   if [ "`getgid amavis`" != "97" ]; then
       echo "Warning: group amavis doesn't have gid=97. Correct this before installing clamav" 1>&2
       exit 1
   fi
else
  echo "adding group amavis GID=97"
  /usr/sbin/groupadd -g 97 -r -f amavis
fi
								
if [ -n "`id -u amavis 2>/dev/null`" ]; then
   if [ "`id -u amavis`" != "97" ]; then
      echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 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
fi

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
   echo "Removing user amavis"
   /usr/sbin/userdel amavis
   echo "Removing group clamav"
   /usr/sbin/groupdel amavis
fi