2014-07-14 14:54:12 -04:00
|
|
|
#!/bin/sh
|
|
|
|
# IBM(c) 2014 Apache 2.0
|
|
|
|
# chkconfig: 345 85 60
|
|
|
|
# description: Confluent hardware manager
|
|
|
|
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: confluent
|
|
|
|
# Default-Start: 3 4 5
|
|
|
|
# Default-Stop: 0 1 2 6
|
|
|
|
### END INIT INFO
|
2014-11-04 12:49:31 -05:00
|
|
|
if [ -f /etc/init.d/functions ]; then
|
|
|
|
. /etc/init.d/functions
|
2014-11-04 13:34:26 -05:00
|
|
|
LOG_SUCCESS=success
|
2014-11-04 12:49:31 -05:00
|
|
|
elif [ -f /lib/lsb/init-functions ]; then
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
LOG_SUCCESS=log_success_msg
|
|
|
|
else
|
|
|
|
echo "Unknown platform"
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-07-14 14:54:12 -04:00
|
|
|
|
|
|
|
case $1 in
|
|
|
|
restart)
|
2014-11-18 17:02:54 -05:00
|
|
|
if [ -S /var/run/confluent/api.sock ]; then
|
|
|
|
echo -n 'Stopping Confluent '
|
|
|
|
/opt/confluent/bin/confetty shutdown /
|
|
|
|
fi
|
2014-07-14 14:54:12 -04:00
|
|
|
echo -n 'Starting Confluent '
|
|
|
|
/opt/confluent/bin/confluent
|
2014-11-04 12:49:31 -05:00
|
|
|
$LOG_SUCCESS
|
2014-07-14 14:54:12 -04:00
|
|
|
;;
|
|
|
|
start)
|
|
|
|
echo -n 'Starting Confluent '
|
|
|
|
/opt/confluent/bin/confluent
|
2014-11-04 12:49:31 -05:00
|
|
|
$LOG_SUCCESS
|
2014-07-14 14:54:12 -04:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
echo -n 'Stopping Confluent '
|
2014-11-18 17:02:54 -05:00
|
|
|
if [ -S /var/run/confluent/api.sock ]; then
|
|
|
|
/opt/confluent/bin/confetty shutdown /
|
|
|
|
fi
|
2014-11-04 12:49:31 -05:00
|
|
|
$LOG_SUCCESS
|
2014-07-14 14:54:12 -04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|