freebsd-ports/security/amavis-stats/files/INSTALL.in
Pav Lucistnik 0393afba2a amavis-stats is a simple AMaViS statistics generator based on rrdtool. It
produces graphs of clean emails, spam emails and infected emails broken down by
virus, from amavis log entries. RRD files are created and updated by a perl
script run from cron. Graphs are generated by a php script and viewed with a
web browser.

PR:		ports/68934
Submitted by:	Mantas Kaulakys <stone@tainet.lt>
2005-02-18 10:02:09 +00:00

37 lines
992 B
Bash

#!/bin/sh
USER=%%AMAVISUSER%%
GROUP=%%AMAVISGROUP%%
if [ "$2" = "PRE-INSTALL" ]; then
if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if /usr/sbin/pw groupadd ${GROUP} -g 113 -h -
then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if /usr/sbin/pw useradd ${USER} -u 113 -g ${GROUP} -h - \
-d /nonexistent \
-s /sbin/nologin \
-c "Amavis-stats Account"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
fi