diff --git a/src/rpm/scripts/postinstall b/src/rpm/scripts/postinstall index 5069201d7f2..ca6be85ea34 100644 --- a/src/rpm/scripts/postinstall +++ b/src/rpm/scripts/postinstall @@ -11,7 +11,14 @@ if [ $1 -eq 1 ] ; then if [ -x /sbin/chkconfig -a "$hasBeenEnabledOnStart" == "false" ] ; then /sbin/chkconfig --add elasticsearch - /etc/init.d/elasticsearch start + # older suse linux distributions do not ship with systemd + # but do not have an /etc/init.d/ directory + # this tries to start elasticsearch on these as well without failing this script + if [ -x /etc/init.d/elasticsearch ] ; then + /etc/init.d/elasticsearch start + elif [ -x /etc/rc.d/init.d/elasticsearch ] ; then + /etc/rc.d/init.d/elasticsearch start + fi fi fi