]> git.pld-linux.org Git - packages/libcgroup.git/blobdiff - cgred.init
- fixed setup
[packages/libcgroup.git] / cgred.init
index 87efef0a4f9ef4750dd1abce19a2a96a5d12999e..4d117a7a69c388c738fbf727a41fb00673fcf261 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # cgred                CGroups Rules Engine Daemon
-# chkconfig:   2345 14 86
+# chkconfig:   2345 02 98
 # description: This is a daemon for automatically classifying processes \
 #              into cgroups based on UID/GID.
 #
@@ -12,6 +12,9 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+# Read in configuration options.
+[ -f /etc/sysconfig/cgred ] && . /etc/sysconfig/cgred
+
 start() {
        if [ -f /var/lock/subsys/cgred ]; then
                msg_already_running "CGroup Rules Engine Daemon"
@@ -30,16 +33,6 @@ start() {
        fi
 
        msg_starting "CGroup Rules Engine Daemon"
-       # Read in configuration options.
-       OPTIONS=""
-       if [ -f /etc/sysconfig/cgred.conf ]; then
-               . /etc/sysconfig/cgred.conf
-
-               OPTIONS="$NODAEMON $LOG"
-               [ -n "$LOG_FILE" ] && OPTIONS="$OPTIONS --logfile=$LOG_FILE"
-               [ -n "$SOCKET_USER" ] && OPTIONS="$OPTIONS -u $SOCKET_USER"
-               [ -n "$SOCKET_GROUP" ] && OPTIONS="$OPTIONS -g $SOCKET_GROUP"
-       fi
 
        daemon --pidfile /var/run/cgrulesengd.pid /sbin/cgrulesengd $OPTIONS
        RETVAL=$?
@@ -59,9 +52,7 @@ stop() {
        msg_stopping "CGroup Rules Engine Daemon"
        killproc --pidfile /var/run/cgrulesengd.pid cgrulesengd -TERM
        RETVAL=$?
-       if [ $RETVAL -eq 0 ] ; then
-               rm -f /var/lock/subsys/cgred /var/run/cgrulesengd.pid
-       fi
+       rm -f /var/lock/subsys/cgred /var/run/cgrulesengd.pid
 }
 
 reload() {
This page took 0.134771 seconds and 4 git commands to generate.