aboutsummaryrefslogtreecommitdiff
path: root/mail/horde-turba/files
diff options
context:
space:
mode:
Diffstat (limited to 'mail/horde-turba/files')
-rw-r--r--mail/horde-turba/files/pkg-deinstall.in9
-rw-r--r--mail/horde-turba/files/pkg-install.in23
2 files changed, 26 insertions, 6 deletions
diff --git a/mail/horde-turba/files/pkg-deinstall.in b/mail/horde-turba/files/pkg-deinstall.in
index afe8f9215da2..fced5020f1b0 100644
--- a/mail/horde-turba/files/pkg-deinstall.in
+++ b/mail/horde-turba/files/pkg-deinstall.in
@@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%TURBADIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
- 0) # original config file, will be deleted by pkg-plist
+ 0) # original config file, delete it
+ rm -f $cf
;;
- 1) # config file has been updated, must be backuped
- cp -p $cf $cf.previous
- echo "===> Backing-up..."
- echo "---> $cf has been saved ***"
- echo "---> as $cf.previous ***"
+ 1) # config file has been updated, leave it alone
;;
*) # not found?
;;
diff --git a/mail/horde-turba/files/pkg-install.in b/mail/horde-turba/files/pkg-install.in
new file mode 100644
index 000000000000..e0611782bf84
--- /dev/null
+++ b/mail/horde-turba/files/pkg-install.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+
+ POST-INSTALL)
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ # Copy over sample config files unless they already exist
+
+ for cf in `ls %%TURBADIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
+ fi
+ done
+ fi
+ ;;
+esac