mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-05 04:27:56 +00:00
Drop the sysvinit script
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
include pam/*
|
||||
include sysvinit/*
|
||||
include systemd/*
|
||||
include sysctl/*
|
||||
|
||||
@@ -56,10 +56,7 @@ python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUI
|
||||
for file in $(grep confluent/__init__.py INSTALLED_FILES.bare); do
|
||||
rm $RPM_BUILD_ROOT/$file
|
||||
done
|
||||
grep -v confluent/__init__.py INSTALLED_FILES.bare | grep -v etc/init.d/confluent > INSTALLED_FILES
|
||||
rm $RPM_BUILD_ROOT/etc/init.d/confluent
|
||||
rmdir $RPM_BUILD_ROOT/etc/init.d
|
||||
rmdir $RPM_BUILD_ROOT/etc
|
||||
grep -v confluent/__init__.py INSTALLED_FILES.bare > INSTALLED_FILES
|
||||
# Only do non-root confluent if systemd of the platform supports it
|
||||
systemd-analyze verify $RPM_BUILD_ROOT/usr/lib/systemd/system/confluent.service 2>&1 | grep "'AmbientCapabilities'" > /dev/null && sed -e 's/User=.*//' -e 's/Group=.*//' -e 's/AmbientCapabilities=.*//' -i $RPM_BUILD_ROOT/usr/lib/systemd/system/confluent.service
|
||||
cat INSTALLED_FILES
|
||||
|
||||
@@ -38,8 +38,7 @@ setup(
|
||||
'aiohmi/redfish/oem/openbmc',
|
||||
'aiohmi/util'],
|
||||
scripts=['bin/confluent', 'bin/confluent_selfcheck', 'bin/confluentdbutil', 'bin/collective', 'bin/osdeploy'],
|
||||
data_files=[('/etc/init.d', ['sysvinit/confluent']),
|
||||
('/usr/lib/sysctl.d', ['sysctl/confluent.conf']),
|
||||
data_files=[('/usr/lib/sysctl.d', ['sysctl/confluent.conf']),
|
||||
('/opt/confluent/share/licenses/confluent_server', ['LICENSE', 'COPYRIGHT']),
|
||||
('/usr/lib/systemd/system', ['systemd/confluent.service']),
|
||||
('/opt/confluent/lib/python/confluent/plugins/console/', [])],
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/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
|
||||
if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
LOG_SUCCESS=success
|
||||
LOG_FAILURE=failure
|
||||
elif [ -f /lib/lsb/init-functions ]; then
|
||||
. /lib/lsb/init-functions
|
||||
LOG_SUCCESS=log_success_msg
|
||||
LOG_FAILURE=log_failure_msg
|
||||
else
|
||||
echo "Unknown platform"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
confluent=/opt/confluent/bin/confluent
|
||||
confetty=/opt/confluent/bin/confetty
|
||||
|
||||
stop() {
|
||||
echo -n 'Stopping Confluent: '
|
||||
if [ -S /var/run/confluent/api.sock ]; then
|
||||
$confetty shutdown /
|
||||
fi
|
||||
$LOG_SUCCESS
|
||||
echo
|
||||
return
|
||||
}
|
||||
|
||||
start() {
|
||||
echo -n 'Starting Confluent: '
|
||||
$confluent
|
||||
if [ $? -eq 0 ]; then
|
||||
$LOG_SUCCESS
|
||||
echo
|
||||
return 0
|
||||
else
|
||||
$LOG_FAILURE
|
||||
echo
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p /var/run/confluent/pid $confluent
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user