summaryrefslogtreecommitdiff
path: root/network/zabbix_proxy/doinst.sh
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2011-09-03 09:20:46 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-04 21:56:29 -0300
commitf208f7bc042a92f60c6b83fa333755dbc9d21747 (patch)
tree3fabb35ec325b2851f7083e79cc675c8116219c3 /network/zabbix_proxy/doinst.sh
parent73d70b76b23caf27623f7d50123e8a554e969e9d (diff)
downloadslackbuilds-f208f7bc042a92f60c6b83fa333755dbc9d21747.tar.gz
network/zabbix_proxy: Updated for version 1.8.6.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/zabbix_proxy/doinst.sh')
-rw-r--r--network/zabbix_proxy/doinst.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/network/zabbix_proxy/doinst.sh b/network/zabbix_proxy/doinst.sh
index ee8cda05b7..6216aa17c2 100644
--- a/network/zabbix_proxy/doinst.sh
+++ b/network/zabbix_proxy/doinst.sh
@@ -10,14 +10,18 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.zabbix_proxy.new:
-if [ -e etc/rc.d/rc.zabbix_proxy ]; then
- cp -a etc/rc.d/rc.zabbix_proxy etc/rc.d/rc.zabbix_proxy.new.incoming
- cat etc/rc.d/rc.zabbix_proxy.new > etc/rc.d/rc.zabbix_proxy.new.incoming
- mv etc/rc.d/rc.zabbix_proxy.new.incoming etc/rc.d/rc.zabbix_proxy.new
-fi
+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
+}
-config etc/rc.d/rc.zabbix_proxy.new
+preserve_perms etc/rc.d/rc.zabbix_proxy.new
config etc/zabbix/zabbix_proxy.conf.new
config var/log/zabbix/zabbix_proxy.log.new
rm -f var/log/zabbix/zabbix_proxy.log.new