diff options
author | Michal Bialozor <bialyy@o2.pl> | 2012-12-23 08:07:41 +0100 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-23 08:08:03 +0100 |
commit | 11ba92aeec284d5e8c3086daf8cc6f5911fb8350 (patch) | |
tree | d956de7d65b4a2b6d3693bf8603ab52fd44675bd /network/zabbix_server/doinst.sh | |
parent | d00f1cb9b914c30c8a81068ca30c1b0e524cda57 (diff) | |
download | slackbuilds-11ba92aeec284d5e8c3086daf8cc6f5911fb8350.tar.gz |
network/zabbix_server: Updated for version 1.8.15, cleanups.
Noted incompatibility with zabbix_proxy
(small bash related cleanups --ponce)
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/zabbix_server/doinst.sh')
-rw-r--r-- | network/zabbix_server/doinst.sh | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/network/zabbix_server/doinst.sh b/network/zabbix_server/doinst.sh index a27b5a564e..a24b013d4e 100644 --- a/network/zabbix_server/doinst.sh +++ b/network/zabbix_server/doinst.sh @@ -1,13 +1,13 @@ 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... + 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... } preserve_perms() { @@ -25,4 +25,3 @@ preserve_perms etc/rc.d/rc.zabbix_server.new config etc/zabbix/zabbix_server.conf.new config var/log/zabbix/zabbix_server.log.new rm -f var/log/zabbix/zabbix_server.log.new - |