diff --git a/mail/simscan/Makefile b/mail/simscan/Makefile index fc89f139c150..8e3ac81481bb 100644 --- a/mail/simscan/Makefile +++ b/mail/simscan/Makefile @@ -19,15 +19,18 @@ USE_QMAIL_BUILD= yes GNU_CONFIGURE= yes +USERS= ${PORTNAME} +GROUPS= ${USERS} + WORKDIR?= ${QMAIL_PREFIX}/${PORTNAME} QMAIL_QUEUE= ${QMAIL_PREFIX}/bin/qmail-queue SUB_FILES= pkg-message \ - pkg-install \ - pkg-deinstall + pkg-install SUB_LIST= QMAIL_PREFIX=${QMAIL_PREFIX} \ SIMSCAN_DIR=${PORTNAME} -PLIST_SUB= QMAIL_PREFIX=${QMAIL_PREFIX} +PLIST_SUB= QMAIL_PREFIX=${QMAIL_PREFIX} \ + SIMSCAN_DIR=${PORTNAME} OPTIONS= CLAMAV "Support for ClamAV Virus Scanning" on \ RIPMIME "Ripmime Processing (if Clamav ScanMail disabled)" on \ diff --git a/mail/simscan/files/pkg-deinstall.in b/mail/simscan/files/pkg-deinstall.in deleted file mode 100644 index 8f7467628f10..000000000000 --- a/mail/simscan/files/pkg-deinstall.in +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -USER=simscan -GROUP=${USER} - -if [ x$2 != xDEINSTALL ]; then - exit -fi - -pw groupdel -n ${GROUP} || true -pw userdel -n ${GROUP} || true - -rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true - -echo "" -echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory" -echo "" diff --git a/mail/simscan/files/pkg-install.in b/mail/simscan/files/pkg-install.in index 5ba5b6762674..b2307e0ed73c 100644 --- a/mail/simscan/files/pkg-install.in +++ b/mail/simscan/files/pkg-install.in @@ -4,40 +4,9 @@ USER=simscan GROUP=${USER} -UID=74 -GID=${UID} SIMDIR=%%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% -if [ "$2" = "PRE-INSTALL" ]; then - -echo adding simscan user - - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - - if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /nonexistent -s /sbin/nologin -c "Simscan User" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - -elif [ "$2" = "POST-INSTALL" ]; then +if [ "$2" = "POST-INSTALL" ]; then if [ ! -d "$SIMDIR" ]; then /bin/mkdir -p "$SIMDIR" || exit 1 diff --git a/mail/simscan/pkg-plist b/mail/simscan/pkg-plist index b7bb25164457..ee246cc68e98 100644 --- a/mail/simscan/pkg-plist +++ b/mail/simscan/pkg-plist @@ -1,3 +1,4 @@ @cwd %%QMAIL_PREFIX%% bin/simscanmk bin/simscan +@dirrmtry %%SIMSCAN_DIR%%