diff --git a/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana b/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana index 94066b0c077e4..a76a1372fbcca 100755 --- a/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana +++ b/src/dev/build/tasks/os_packages/service_templates/sysv/etc/init.d/kibana @@ -91,6 +91,10 @@ stop() { fi } +restart() { + stop && start +} + status() { if [ -f "$pidfile" ] ; then pid=$(cat "$pidfile") @@ -118,7 +122,7 @@ force_stop() { case "$1" in - force-start|start|stop|force-stop|restart) + force-start|start|stop|force-stop|condrestart|try-restart|restart) trace "Attempting '$1' on kibana" ;; esac @@ -151,9 +155,15 @@ case "$1" in fi exit $code ;; + condrestart|try-restart) + status + code=$? + if [ $code -eq 0 ] ; then + restart + fi + ;; restart) - - stop && start + restart ;; *) echo "Usage: $SCRIPTNAME {start|force-start|stop|force-start|force-stop|status|restart}" >&2