summaryrefslogtreecommitdiff
path: root/network/mod_geoip2
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2011-03-23 18:19:25 -0400
committerRobby Workman <rworkman@slackbuilds.org>2011-03-24 19:23:16 -0500
commite821e5f6f8667c89f7910f88f904e3d103ba97a0 (patch)
tree7ee63405989cd185057ae49761542870620ccfac /network/mod_geoip2
parentcc961fa42056210e2fcf5a5418cc41d946de94c7 (diff)
downloadslackbuilds-e821e5f6f8667c89f7910f88f904e3d103ba97a0.tar.gz
network/mod_geoip2: Handle .new files correctly.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/mod_geoip2')
-rw-r--r--network/mod_geoip2/doinst.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/network/mod_geoip2/doinst.sh b/network/mod_geoip2/doinst.sh
index 83bf461e9e..ad529d2fa6 100644
--- a/network/mod_geoip2/doinst.sh
+++ b/network/mod_geoip2/doinst.sh
@@ -11,5 +11,15 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/httpd/mod_geoip.conf.new
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+preserve_perms etc/httpd/extra/mod_geoip.conf.new \ No newline at end of file