summaryrefslogtreecommitdiff
path: root/mail/yatsvrs/INSTALL
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2001-11-15 23:21:29 +0000
committertaca <taca@pkgsrc.org>2001-11-15 23:21:29 +0000
commite380dbc133358278c367e9a74bcdf38fdd783857 (patch)
tree7ef5b2c0834a9c4a14bb9410ee95f5e19bb84184 /mail/yatsvrs/INSTALL
parent9e8ad757afb92897329f24b0e82fe1e303b66311 (diff)
downloadpkgsrc-e380dbc133358278c367e9a74bcdf38fdd783857.tar.gz
Re-import yatsvrs with correct directory name.
Diffstat (limited to 'mail/yatsvrs/INSTALL')
-rw-r--r--mail/yatsvrs/INSTALL47
1 files changed, 47 insertions, 0 deletions
diff --git a/mail/yatsvrs/INSTALL b/mail/yatsvrs/INSTALL
new file mode 100644
index 00000000000..cedf50277bb
--- /dev/null
+++ b/mail/yatsvrs/INSTALL
@@ -0,0 +1,47 @@
+#!/bin/sh
+# $Id: INSTALL,v 1.1.1.1 2001/11/15 23:21:30 taca Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+AWK="@AWK@"
+CHMOD="@CHMOD@"
+MKDIR="@MKDIR@"
+INSTALL_DATA="@YATSVR_INSTALL_DATA@"
+
+YAT_CONF_DIR="@CONFDIR@"
+YAT_EXAMPLES_DIR="@EXAMPLESDIR@"
+DEFAULT_ADMIN="@DEFAULT_ADMIN@"
+EXAMPLES="@EXAMPLES@"
+MIN="@YATSVR_MINGID@"
+MAX="@YATSVR_MAXGID@"
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+POST-INSTALL)
+
+ if [ ! -d ${YAT_CONF_DIR} ]; then
+ ${MKDIR} -p ${YAT_CONF_DIR}
+ fi
+ for f in ${EXAMPLES}; do
+ if [ ! -f ${YAT_CONF_DIR}/$f ]; then
+ ${INSTALL_DATA} ${YAT_EXAMPLES_DIR}/$f.example \
+ ${YAT_CONF_DIR}/$f
+ fi
+ done
+ if [ ! -f ${YAT_CONF_DIR}/.admin ]; then
+ echo ${DEFAULT_ADMIN} > ${YAT_CONF_DIR}/.admin
+ ${CHMOD} 0600 ${YAT_CONF_DIR}/.admin
+ fi
+ # hack for restrict groups
+ ${AWK} -F: '$1 !~ /^no/ { if ($3 < '$MIN' || $3 > '$MAX') print $1}' \
+ /etc/group > ${YAT_CONF_DIR}/.hidden-group
+ ${CHMOD} 0600 ${YAT_CONF_DIR}/.hidden-group
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0