aboutsummaryrefslogtreecommitdiff
path: root/www/horde-passwd
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-04-15 16:23:50 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-04-15 16:23:50 +0000
commitc39f14401355954a0c5d01b7a2a0a655ee06a993 (patch)
tree285584564ec9b81936af2e4de9c9d55fc8bef643 /www/horde-passwd
parentf25b2bf7b337aa5ae1b5ef58078aa0b09b1ee539 (diff)
downloadports-c39f14401355954a0c5d01b7a2a0a655ee06a993.tar.gz
ports-c39f14401355954a0c5d01b7a2a0a655ee06a993.zip
Notes
Diffstat (limited to 'www/horde-passwd')
-rw-r--r--www/horde-passwd/files/pkg-deinstall.in10
-rw-r--r--www/horde-passwd/files/pkg-install.in23
2 files changed, 26 insertions, 7 deletions
diff --git a/www/horde-passwd/files/pkg-deinstall.in b/www/horde-passwd/files/pkg-deinstall.in
index 7f79726e85c1..e3d33344b298 100644
--- a/www/horde-passwd/files/pkg-deinstall.in
+++ b/www/horde-passwd/files/pkg-deinstall.in
@@ -2,7 +2,6 @@
#
# $FreeBSD$
#
-# Backup horde-passwd config files, if needed.
if [ x$2 != xDEINSTALL ]; then
exit
@@ -12,13 +11,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%PWDDIR%%/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/www/horde-passwd/files/pkg-install.in b/www/horde-passwd/files/pkg-install.in
new file mode 100644
index 000000000000..7ada28ff461b
--- /dev/null
+++ b/www/horde-passwd/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 %%PWDDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
+ fi
+ done
+ fi
+ ;;
+esac