1
0
Files
2022-09-29 17:59:04 +03:00

48 lines
910 B
Bash
Executable File

#! /sbin/sh
#Tag 0x00000f00
# System Controller Daemon
# "$Revision: 1.12 $"
IS_ON=/sbin/chkconfig
case "$1" in
'start')
# Start the system controller daemon
killall -TERM sysctlrd
# Do we want the powermeter?
if $IS_ON cpumeter ; then
# Do we want graceful shutdown?
if $IS_ON cleanpowerdown ; then
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -d -g" &
else
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -d" &
fi
else
# Do we want graceful shutdown?
if $IS_ON cleanpowerdown ; then
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -n -d -g" &
else
/sbin/suattr -C CAP_SCHED_MGT+ip -c "/usr/etc/sysctlrd -n -d" &
fi
fi
;;
'stop')
# Stop the system controller daemon
killall -TERM sysctlrd
sleep 2
/sbin/scmsg "System coming down.."
exit 0
;;
*)
echo "usage: $0 {start|stop}"
;;
esac