summaryrefslogtreecommitdiff
path: root/system/elasticsearch/doinst.sh
diff options
context:
space:
mode:
authorDaniel Romero <infoslack@gmail.com>2014-01-21 23:34:58 +0700
committerErik Hanson <erik@slackbuilds.org>2014-01-29 23:21:10 -0600
commit2554c2c42c4c7a3bac4f114049a7eb3a8b97c3dc (patch)
tree68460cf313a3a9f3405db3384aea6a78f237224b /system/elasticsearch/doinst.sh
parent86aa649653ef483e21648f7ea7ab52f1b39d2f33 (diff)
downloadslackbuilds-2554c2c42c4c7a3bac4f114049a7eb3a8b97c3dc.tar.gz
system/elasticsearch: Added (distributed RESTful search engine).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
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 0000000000..94745093e2
--- /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