diff options
author | Andre Barboza <bmg.andre@gmail.com> | 2015-12-31 00:04:44 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-12-31 00:04:44 +0700 |
commit | 56adb73145bcbb7a2ec49c6b7f1d8e61b83e837e (patch) | |
tree | 4d370c4ec875783cfb93c92f452004afb7c1eea4 /system/rabbitmq-server/doinst.sh | |
parent | 8f452cfbfbb1ac4558c20213b7c01ae27a9bc357 (diff) | |
download | slackbuilds-56adb73145bcbb7a2ec49c6b7f1d8e61b83e837e.tar.gz |
system/rabbitmq-server: Added (multi-protocol messaging broker).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/rabbitmq-server/doinst.sh')
-rw-r--r-- | system/rabbitmq-server/doinst.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/system/rabbitmq-server/doinst.sh b/system/rabbitmq-server/doinst.sh new file mode 100644 index 0000000000..7c748bc08a --- /dev/null +++ b/system/rabbitmq-server/doinst.sh @@ -0,0 +1,23 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $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 +} + +preserve_perms etc/rc.d/rc.rabbitmq.new +config etc/rabbitmq/rabbitmq-env.conf.new |