Browse Source

Packaging: Fix vagrant tests on centos 6 (#17979)

The RPM init script did not include the check for `bin/elasticsearch` being
executable. This fix adds this checks and makes the tests pass.

This fixes the init script, so the tests pass on centos-6 again.
Alexander Reelsen 9 years ago
parent
commit
9cadc1f40b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      distribution/rpm/src/main/packaging/init.d/elasticsearch

+ 5 - 0
distribution/rpm/src/main/packaging/init.d/elasticsearch

@@ -71,6 +71,11 @@ if [ -n $USER ] && [ -z $ES_USER ] ; then
    ES_USER=$USER
 fi
 
+if [ ! -x "$exec" ]; then
+    echo "The elasticsearch startup script does not exists or it is not executable, tried: $exec"
+    exit 1
+fi
+
 checkJava() {
     if [ -x "$JAVA_HOME/bin/java" ]; then
         JAVA="$JAVA_HOME/bin/java"