#!/bin/bash

#stop apache
/sbin/service httpd stop

#Destroy all lve processes
if [ -e /usr/sbin/lveps ]; then
    /usr/sbin/lveps -p | while read line 
    do
	rs=`echo $line | cut -f3 -d' '`
	rs_non_ps=`echo $line | cut -f1 -d' ' | grep "\-\-\-"`
	if [ -n "$rs_non_ps" ];then
	    if [ -n "$rs" ]; then
		/bin/kill -9 $rs &>/dev/null
	    fi
	fi
    done
fi
#Destroy all lve
/usr/sbin/lvectl flush all

#start apache
/sbin/service httpd start
