aboutsummaryrefslogtreecommitdiff
path: root/libraries/php-suhosin/doinst.sh
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-09-17 04:47:52 -0400
committerRobby Workman <rworkman@slackbuilds.org>2010-09-21 22:09:37 -0500
commitbb94b73abd64a8108a904be8134b876b71484acf (patch)
tree4b5baaef354606a6207f7f5cb50d99753ae6c9de /libraries/php-suhosin/doinst.sh
parent3dae1846b0ad71c7528dd955362f6064f837f22a (diff)
libraries/php-suhosin: Added (PHP security extension)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/php-suhosin/doinst.sh')
-rw-r--r--libraries/php-suhosin/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/libraries/php-suhosin/doinst.sh b/libraries/php-suhosin/doinst.sh
new file mode 100644
index 0000000000000..f6da772a25062
--- /dev/null
+++ b/libraries/php-suhosin/doinst.sh
@@ -0,0 +1,15 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/php/suhosin.ini.new
+