aboutsummaryrefslogtreecommitdiff
path: root/mail/squirrelmail/files
diff options
context:
space:
mode:
Diffstat (limited to 'mail/squirrelmail/files')
-rw-r--r--mail/squirrelmail/files/pkg-deinstall.in43
-rw-r--r--mail/squirrelmail/files/pkg-install.in57
-rw-r--r--mail/squirrelmail/files/pkg-message.in18
3 files changed, 118 insertions, 0 deletions
diff --git a/mail/squirrelmail/files/pkg-deinstall.in b/mail/squirrelmail/files/pkg-deinstall.in
new file mode 100644
index 000000000000..b0738c370e2c
--- /dev/null
+++ b/mail/squirrelmail/files/pkg-deinstall.in
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+#set -vx
+
+PKG_BATCH=${BATCH:=NO}
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+SQUIRRELDIR=%%SQUIRRELDIR%%
+
+checkfile() {
+ diff -bBqw $1 $2 >/dev/null 2>&1
+ case $? in
+ 0) # config file exists, but is the same
+ rm $1
+ ;;
+ 1) # config file exists and differs
+ ;;
+ *) # no config file exists
+ ;;
+ esac
+}
+
+case $2 in
+ DEINSTALL)
+ cd ${PKG_PREFIX}
+ checkfile /var/spool/squirrelmail/prefs/default_pref \
+ ${SQUIRRELDIR}/data/default_pref
+ ;;
+ POST-DEINSTALL)
+ if [ "${PKG_BATCH}" = "NO" ]; then
+ echo "If you are no longer going to use SquirrelMail"
+ echo "you should remove the /var/spool/squirrelmail"
+ echo "directory with:"
+ echo
+ echo " rm -rf /var/spool/squirrelmail"
+ fi
+ ;;
+
+esac
diff --git a/mail/squirrelmail/files/pkg-install.in b/mail/squirrelmail/files/pkg-install.in
new file mode 100644
index 000000000000..0b09cf9464aa
--- /dev/null
+++ b/mail/squirrelmail/files/pkg-install.in
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_BATCH=${BATCH:=NO}
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+SQUIRRELDIR=%%SQUIRRELDIR%%
+
+case $2 in
+PRE-INSTALL)
+ USER=www
+ GROUP=${USER}
+ UID=80
+ GID=${UID}
+
+ if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -s "/sbin/nologin" -d "/nonexistent" \
+ -c "World Wide Web Owner"; \
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+
+ exit 0
+ ;;
+POST-INSTALL)
+ if [ "${PKG_BATCH}" = "NO" ]; then
+ install -d -o www -g www -m 0755 /var/spool/squirrelmail
+ install -d -o www -g www -m 0730 /var/spool/squirrelmail/attach
+ install -d -o www -g www -m 0750 /var/spool/squirrelmail/pref
+ if [ ! -f /var/spool/squirrelmail/pref/default_pref ]; then
+ cp -rp ${SQUIRRELDIR}/data/default_pref \
+ /var/spool/squirrelmail/pref/default_pref
+ else
+ echo ""
+ echo "An older version of default_pref exists in"
+ echo "/var/spool/squirrelmail/pref, you may want to"
+ echo "compare it with the one in ${SQUIRRELDIR}/data"
+ fi
+ fi
+ ;;
+esac
diff --git a/mail/squirrelmail/files/pkg-message.in b/mail/squirrelmail/files/pkg-message.in
new file mode 100644
index 000000000000..e1b051f64f50
--- /dev/null
+++ b/mail/squirrelmail/files/pkg-message.in
@@ -0,0 +1,18 @@
+
+You now need to add an alias to apache's httpd.conf pointing to
+%%SQUIRRELDIR%% in order to access SquirrelMail from
+your web browser, or create a VirtualHost with DocumentRoot set
+to that directory.
+
+For SquirrelMail to work properly you will need to make sure the
+following option is set in your php.ini file:
+file_uploads = On
+
+If you have problems with SquirrelMail saying "you must login" after
+you just have, the following php.ini option may help:
+session.auto_start = 1
+
+In order to do your administrative configuration you need to
+cd %%SQUIRRELDIR%% && ./configure
+SquirrelMail will not work until this has been done.
+