summaryrefslogtreecommitdiffstats
path: root/testing/libcgroup/cgred.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-09-11 10:33:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-09-11 10:33:46 +0000
commit1e41aec846763728d6c3338cd6227d30827f3ee1 (patch)
tree7aab7bde87e73f59b72f583e2242d1d1c0ec1d6f /testing/libcgroup/cgred.initd
parent308573dd347484fb43ad515d504e10a3b09085ec (diff)
downloadaports-1e41aec846763728d6c3338cd6227d30827f3ee1.tar.bz2
aports-1e41aec846763728d6c3338cd6227d30827f3ee1.tar.xz
testing/libcgroup: new aport
Library to control and monitor control groups http://libcg.sourceforge.net/
Diffstat (limited to 'testing/libcgroup/cgred.initd')
-rw-r--r--testing/libcgroup/cgred.initd34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/libcgroup/cgred.initd b/testing/libcgroup/cgred.initd
new file mode 100644
index 000000000..68c0af675
--- /dev/null
+++ b/testing/libcgroup/cgred.initd
@@ -0,0 +1,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 $?
+}
+