From 74a83a4502d7a74b846754a48fd03ae45df01969 Mon Sep 17 00:00:00 2001 From: Jarrod Johnon Date: Tue, 4 Nov 2014 12:49:31 -0500 Subject: [PATCH] Init script modifications for SLES --- confluent_server/sysvinit/confluent | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/confluent_server/sysvinit/confluent b/confluent_server/sysvinit/confluent index 35860f6b..ed99f876 100755 --- a/confluent_server/sysvinit/confluent +++ b/confluent_server/sysvinit/confluent @@ -8,25 +8,34 @@ # Default-Start: 3 4 5 # Default-Stop: 0 1 2 6 ### END INIT INFO +if [ -f /etc/init.d/functions ]; then + . /etc/init.d/functions + LOG_SUCCESS=RHSuccess +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + LOG_SUCCESS=log_success_msg +else + echo "Unknown platform" + exit 1 +fi -. /etc/init.d/functions case $1 in restart) echo -n 'Stopping Confluent ' /opt/confluent/bin/confetty shutdown / echo -n 'Starting Confluent ' /opt/confluent/bin/confluent - success + $LOG_SUCCESS ;; start) echo -n 'Starting Confluent ' /opt/confluent/bin/confluent - success + $LOG_SUCCESS ;; stop) echo -n 'Stopping Confluent ' /opt/confluent/bin/confetty shutdown / - success + $LOG_SUCCESS ;; esac