summaryrefslogtreecommitdiff
path: root/network/mod_wsgi
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2011-03-23 18:19:49 -0400
committerRobby Workman <rworkman@slackbuilds.org>2011-03-24 19:23:16 -0500
commitc93b1b4062775db0c364e9b9bb10b05ac7605c57 (patch)
treebed11ad6e3f955c52653e63ebd295331ee0d84b5 /network/mod_wsgi
parente821e5f6f8667c89f7910f88f904e3d103ba97a0 (diff)
downloadslackbuilds-c93b1b4062775db0c364e9b9bb10b05ac7605c57.tar.gz
network/mod_wsgi: Handle .new files correctly.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/mod_wsgi')
-rw-r--r--network/mod_wsgi/doinst.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/network/mod_wsgi/doinst.sh b/network/mod_wsgi/doinst.sh
index 7deb2518db..9650048d97 100644
--- a/network/mod_wsgi/doinst.sh
+++ b/network/mod_wsgi/doinst.sh
@@ -11,5 +11,16 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/httpd/mod_wsgi.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_wsgi.conf.new