Add a posibility to set socker owner to init scripts.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
NODAEMON=""
#NODAEMON="--nodaemon"
+# Set owner of cgred socket. 'cgexec' tool should have write access there
+# (either using suid and/or sgid permissions or Linux capabilities).
+SOCKET_USER=""
+SOCKET_GROUP="cgred"
+
# Uncomment the second line to disable logging for CGroup Rules Engine
# Uncomment the third line to enable more verbose logging.
LOG=""
if [ -n "$LOG_FILE" ]; then
OPTIONS="$OPTIONS --log-file=$LOG_FILE"
fi
+ if [ -n "$SOCKET_USER" ]; then
+ OPTIONS="$OPTIONS -u $SOCKET_USER"
+ fi
+ if [ -n "$SOCKET_GROUP" ]; then
+ OPTIONS="$OPTIONS -g $SOCKET_GROUP"
+ fi
else
OPTIONS=""
fi