2 #----------------------------------------------------
3 #shell used to clean the host part (network, cgroup)
4 #while stopping a vzgot Virtual Host
5 #This shell is called from the vzgot executable
7 #----------------------------------------------------
9 #vzgot.open VE_name VE_pid [base_dir]
10 # VE_name is the container dir name
11 # VE_pid is the container main process ID as seen
13 # base_dir is this application root directory
14 # used for devel only.
15 #----------------------------------------------------
19 #----------------------------------------------------
20 if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then
21 echo "Missing vzgot config file"
22 exit 1 #trouble trouble
24 . $BASE/etc/vzgot/vzgot_config
26 #specific container configuration override (if needed)
27 if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then
28 $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config
30 #----------------------------------------------------
31 #lets cancel all routing
32 $BASE/$VZLIB/shell/vzgot.net $CONTNAME remove $BASE
33 #----------------------------------------------------
34 #Using cgroup if available and operational
35 if [ -f $CGROUP/tasks ] ; then
36 rm -fr $BASE/$VZLIB/vzdir/$CONTNAME/cgroup