#!/bin/sh # # openshift-cgroups This shell script initializes openshift control groups # # Author: Seth Vidal # Mike McGrath # Mark lamourine # # chkconfig: 345 16 84 # # Required-Start: cgconfig cgred # # description: Create Openshift user cgroups # processname: NA # # CAVEAT: if the policy is changed, must run these by hand (release ticket) # source function library . /etc/rc.d/init.d/functions case "$1" in start) /usr/bin/oo-admin-ctl-cgroups startall ;; stop) /usr/bin/oo-admin-ctl-cgroups stopall ;; restart|force-reload|reload) /usr/bin/oo-admin-ctl-cgroups restartall ;; condrestart) /usr/bin/oo-admin-ctl-cgroups condrestartall ;; status) /usr/bin/oo-admin-ctl-cgroups status $2 ;; startuser) /usr/bin/oo-admin-ctl-cgroups startuser $2 ;; stopuser) /usr/bin/oo-admin-ctl-cgroups stopuser $2 ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|startuser |stopuser }" exit 1 esac exit $RETVAL