summaryrefslogtreecommitdiff
path: root/network/mod_geoip2/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'network/mod_geoip2/doinst.sh')
-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