aboutsummaryrefslogtreecommitdiff
path: root/mail/qpopper/pkg-install
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-10-05 03:48:34 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-10-05 03:48:34 +0000
commitd494132719f649d699b65dc7952e09a46691ad43 (patch)
tree1b3cebc6999d6de397f5727fd2460431b1b387d6 /mail/qpopper/pkg-install
parent89d58bf2f4d8764aa8e4e41e312c7a65fe63be5e (diff)
Notes
Diffstat (limited to 'mail/qpopper/pkg-install')
-rw-r--r--mail/qpopper/pkg-install53
1 files changed, 53 insertions, 0 deletions
diff --git a/mail/qpopper/pkg-install b/mail/qpopper/pkg-install
new file mode 100644
index 000000000000..838c114b4337
--- /dev/null
+++ b/mail/qpopper/pkg-install
@@ -0,0 +1,53 @@
+#!/bin/sh
+# $FreeBSD$
+
+# based on original from op port, written by Cyrille Lefevre
+# <clefevre@citeweb.net>
+
+[ $# != 2 ] && exit 1
+PKGNAME=$1
+ACTION=$2
+
+CONF_DIR=${PKG_PREFIX}/etc/qpopper
+
+CONF_FILE=popusers
+CONF_OWN=pop
+CONF_GRP=daemon
+CONF_MODE=444
+
+SAMP_SUFX=.sample
+
+INSTALL=install
+CMP=cmp
+RM=rm
+
+case "$ACTION" in
+
+POST-INSTALL)
+ if [ -f ${CONF_DIR}/${CONF_FILE} ]; then
+ echo "$PKGNAME: Will not overwrite existing ${CONF_DIR}/${CONF_FILE} file."
+ else
+ ${INSTALL} -c -o ${CONF_OWN} -g ${CONF_GRP} -m ${CONF_MODE} \
+ ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \
+ ${CONF_DIR}/${CONF_FILE}
+ fi
+ ;;
+
+DEINSTALL)
+ if ${CMP} -s ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \
+ ${CONF_DIR}/${CONF_FILE}; then
+ ${RM} -f ${CONF_DIR}/${CONF_FILE}
+ else
+ echo "$PKGNAME: Will not remove existing ${CONF_DIR}/${CONF_FILE} file."
+ fi
+ ;;
+
+PRE-INSTALL|POST-DEINSTALL)
+ ;;
+
+*)
+ exit 1
+ ;;
+esac
+
+exit