You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/libcgroup/files/cgred.initd

42 lines
949 B

#!/sbin/runscript
#
# CGroups Rules Engine Daemon
#
# This is a daemon for automatically classifying processes into cgroups based
# on UID/GID.
#
opts="${opts} reload"
CGRULESENGD="/usr/sbin/cgrulesengd"
PID_FILE=${PID_FILE:-"/var/run/cgred.pid"}
depend() {
need cgconfig
use logger
}
start() {
local options="${NODAEMON} ${LOG}"
if [[ -n "${LOG_FILE}" ]]; then
options="${options} --log-file=${LOG_FILE}"
fi
ebegin "Starting CGroup Rules Engine Daemon"
start-stop-daemon --start --pidfile "${PID_FILE}" --make-pidfile \
--background --exec "${CGRULESENGD}" -- ${options} >/dev/null
eend $?
}
stop() {
ebegin "Stopping CGroup Rules Engine Daemon"
start-stop-daemon --stop --pidfile "${PID_FILE}" --exec "${CGRULESENGD}"
eend $?
}
reload() {
ebegin "Reloading CGroup Rules Engine Daemon"
start-stop-daemon --stop --signal USR2 --oknodo --background \
--pidfile "${PID_FILE}" --make-pidfile --exec "${CGRULESENGD}"
eend $?
}