aboutsummaryrefslogtreecommitdiff
path: root/system/elasticsearch/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'system/elasticsearch/doinst.sh')
-rw-r--r--system/elasticsearch/doinst.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/elasticsearch/doinst.sh b/system/elasticsearch/doinst.sh
new file mode 100644
index 0000000000000..94745093e2bdb
--- /dev/null
+++ b/system/elasticsearch/doinst.sh
@@ -0,0 +1,12 @@
+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
+}
+
+config etc/rc.d/rc.elasticsearch.new