diff options
author | Oleg A. Deordiev <admin@ifconfig.com.ua> | 2014-12-01 00:54:56 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-12-01 00:57:48 +0700 |
commit | 9727e91f36f9f1ceac2d4be7e8edfa9879cd91a3 (patch) | |
tree | e317d90575f706f458f1c52c9453f0a7de2f3e3e /network/geoipupdate/doinst.sh | |
parent | 97bd0f47b7779d01562aa07bfe106c5e316a86e1 (diff) | |
download | slackbuilds-9727e91f36f9f1ceac2d4be7e8edfa9879cd91a3.tar.gz |
network/geoipupdate: Added (GeoIP Updater).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/geoipupdate/doinst.sh')
-rw-r--r-- | network/geoipupdate/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/network/geoipupdate/doinst.sh b/network/geoipupdate/doinst.sh new file mode 100644 index 0000000000..4d0f1379a3 --- /dev/null +++ b/network/geoipupdate/doinst.sh @@ -0,0 +1,14 @@ +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/GeoIP.conf.new |