summaryrefslogtreecommitdiff
path: root/private/php-pgsql/doinst.sh
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-12-09 18:28:42 +0100
committerEugen Wissner <belka@caraus.de>2020-12-09 18:28:42 +0100
commit2910a89d6c59b997a3896f05c6ad7fb65c26f813 (patch)
tree3d3edebdf32b0c972e8449b82be2c10742395d6c /private/php-pgsql/doinst.sh
parentbe64bc6dbb9d0f717f7cbdd83d9371de979d4c63 (diff)
downloadslackbuilder-2910a89d6c59b997a3896f05c6ad7fb65c26f813.tar.gz
Add autoupdater
Diffstat (limited to 'private/php-pgsql/doinst.sh')
-rw-r--r--private/php-pgsql/doinst.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/private/php-pgsql/doinst.sh b/private/php-pgsql/doinst.sh
new file mode 100644
index 0000000..b4fdb0a
--- /dev/null
+++ b/private/php-pgsql/doinst.sh
@@ -0,0 +1,16 @@
+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.d/pgsql.ini.new
+config etc/php.d/pdo_pgsql.ini.new
+