blob: 68c0af67524f1a12738b3f718f9c90517a5a4518 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/sbin/runscript
#
# CGroups Rules Engine Daemon
#
# This is a daemon for automatically classifying processes into cgroups based
# on UID/GID.
#
extra_started_commands="reload"
name="CGroup Rules Engine Daemon"
command="/usr/sbin/cgrulesengd"
pidfile=${PID_FILE:-"/var/run/cgred.pid"}
command_args="${NODAEMON} ${LOG}"
start_stop_daemon_args="--make-pidfile --background --stdout /dev/null"
depend() {
need cgconfig
use logger
}
start_pre() {
if [ -n "${LOG_FILE}" ]; then
command_args="${command_args} --log-file=${LOG_FILE}"
fi
}
reload() {
ebegin "Reloading ${name}"
start-stop-daemon --signal USR2 --pidfile "${pidfile}" \
--exec "${command}"
eend $?
}
|