summaryrefslogtreecommitdiff
path: root/business/openerp-server/doinst.sh
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-05-13 00:57:33 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:57:33 +0200
commitb85ca6c5a998685631293a9ca60bc218cab7d207 (patch)
tree48b188bd935148d74b02c6d2efdbbd962233143d /business/openerp-server/doinst.sh
parent1da880f92e55737f2bc6bdecd2018da0c33197c0 (diff)
downloadslackbuilds-b85ca6c5a998685631293a9ca60bc218cab7d207.tar.gz
business/openerp-server: Added to 13.0 repository
Diffstat (limited to 'business/openerp-server/doinst.sh')
-rw-r--r--business/openerp-server/doinst.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/business/openerp-server/doinst.sh b/business/openerp-server/doinst.sh
new file mode 100644
index 0000000000..a513a9c6fe
--- /dev/null
+++ b/business/openerp-server/doinst.sh
@@ -0,0 +1,23 @@
+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...
+}
+
+# Keep same perms on rc.openerp-server.new:
+if [ -e etc/rc.d/rc.openerp-server ]; then
+ cp -a etc/rc.d/rc.openerp-server etc/rc.d/rc.openerp-server.new.incoming
+ cat etc/rc.d/rc.openerp-server.new > etc/rc.d/rc.openerp-server.new.incoming
+ mv etc/rc.d/rc.openerp-server.new.incoming etc/rc.d/rc.openerp-server.new
+fi
+
+config etc/rc.d/rc.openerp-server.new
+config etc/openerp/openerp-server.conf.new
+