From a73a5062c74786570556eb9313c72203723587e5 Mon Sep 17 00:00:00 2001 From: David Boon Date: Wed, 26 Jun 2013 15:15:39 -0400 Subject: [PATCH] changed to allow amazon linux to be installed just like redhat linux, which makes sense since it's a port of centos or redhat. To install with the upstart daemon run like: sudo bash -c 'USE_UPSTART=1 /usr/local/elasticsearch/bin/service/elasticsearch install' Also see gist here: https://gist.github.com/evadnoob/5869793 --- service/elasticsearch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/service/elasticsearch b/service/elasticsearch index f60242a..b2f7617 100755 --- a/service/elasticsearch +++ b/service/elasticsearch @@ -1056,8 +1056,8 @@ installdaemon() { ln -s "/etc/init.d/$APP_NAME" "/etc/rc3.d/S20$APP_NAME_LOWER" fi elif [ "$DIST_OS" = "linux" ] ; then - if [ -f /etc/redhat-release -o -f /etc/redhat_version -o -f /etc/fedora-release ] ; then - eval echo `gettext 'Detected RHEL or Fedora:'` + if [ -f /etc/redhat-release -o -f /etc/redhat_version -o -f /etc/fedora-release -o -f /etc/system-release ] ; then + eval echo `gettext 'Detected RHEL or Fedora or Amazon Linux:'` if [ -f "/etc/init.d/$APP_NAME" -o -f "/etc/init/${APP_NAME}.conf" ] ; then eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'` exit 1 @@ -1249,8 +1249,8 @@ removedaemon() { exit 1 fi elif [ "$DIST_OS" = "linux" ] ; then - if [ -f /etc/redhat-release -o -f /etc/redhat_version -o -f /etc/fedora-release ] ; then - eval echo `gettext 'Detected RHEL or Fedora:'` + if [ -f /etc/redhat-release -o -f /etc/redhat_version -o -f /etc/fedora-release -o -f /etc/system-release ] ; then + eval echo `gettext 'Detected RHEL or Fedora or Amazon Linux:'` if [ -f "/etc/init.d/$APP_NAME" ] ; then stopit "0" eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`