summaryrefslogtreecommitdiff
path: root/mail/mixminion
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mixminion')
-rw-r--r--mail/mixminion/Makefile4
-rw-r--r--mail/mixminion/pkg-deinstall62
-rw-r--r--mail/mixminion/pkg-install40
3 files changed, 2 insertions, 104 deletions
diff --git a/mail/mixminion/Makefile b/mail/mixminion/Makefile
index 61e71ac7f83f..f4cc7d5a0905 100644
--- a/mail/mixminion/Makefile
+++ b/mail/mixminion/Makefile
@@ -33,6 +33,8 @@ OPTIONS= SERVER "Also install the server" on
USE_RC_SUBR+= mixminiond
SUB_FILES+= pkg-message
PLIST_SUB+= SERVER=""
+USERS= _${PORTNAME:L}
+GROUPS= ${USERS}
.else
PLIST_SUB+= SERVER="@comment "
.endif
@@ -46,8 +48,6 @@ post-install:
${PREFIX}/etc/mixminiond.conf.sample
@${INSTALL_DATA} ${WRKSRC}/etc/blacklist.conf \
${PREFIX}/etc/blacklist.conf.sample
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
- ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@-${MKDIR} /var/spool/mixminion
@${CHOWN} _mixminion:_mixminion /var/spool/mixminion
@${CHMOD} 0700 /var/spool/mixminion
diff --git a/mail/mixminion/pkg-deinstall b/mail/mixminion/pkg-deinstall
deleted file mode 100644
index 2ea7fc9e2754..000000000000
--- a/mail/mixminion/pkg-deinstall
+++ /dev/null
@@ -1,62 +0,0 @@
-#! /bin/sh
-#
-# taken from net/cvsup-mirror
-
-PATH=/bin:/usr/sbin
-
-MIXMINION_USER=${MIXMINION_USER:-_mixminion}
-MIXMINION_GROUP=${MIXMINION_GROUP:-_mixminion}
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-delete_account() {
- local u g home
-
- u=$1
- g=$2
- if yesno "Do you want me to remove group \"${g}\"" y; then
- pw groupdel -n ${g}
- echo "Done."
- fi
- if yesno "Do you want me to remove user \"${u}\"" y; then
- eval home=~${u}
- pw userdel -n ${u}
- echo "Done."
- if [ -d "${home}" ]; then
- echo "Please remember to remove the home directory \"${home}\""
- fi
- fi
-}
-
-if [ x$2 != xDEINSTALL ]; then
- exit
-fi
-
-delete_account ${MIXMINION_USER} ${MIXMINION_GROUP}
diff --git a/mail/mixminion/pkg-install b/mail/mixminion/pkg-install
deleted file mode 100644
index c09977eb917b..000000000000
--- a/mail/mixminion/pkg-install
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-#
-# taken from devel/perforce
-
-PATH=/bin:/usr/sbin
-
-MIXMINION_USER=${MIXMINION_USER:-_mixminion}
-MIXMINION_GROUP=${MIXMINION_GROUP:-_mixminion}
-
-case $2 in
-PRE-INSTALL)
- USER=${MIXMINION_USER}
- GROUP=${MIXMINION_GROUP}
-
- 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} ; 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} -g ${GROUP} -h - \
- -d /nonexistent -c "Mixminion Daemon" -s /sbin/nologin
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
-
- ;;
-esac