Current File : //root/scripts/AISA_INSTALLATION.sh
mkdir -p /root/scripts/aisa
mkdir -p /root/scripts/makeaisa
cd  /root/scripts/makeaisa
get_sh_path=`whereis sh | awk '{print $2}'`
get_wget_path=`whereis wget | awk '{print $2}'`
kill -9 $(lsof -t -i:8010)
: > /root/scripts/aisa/aisa.log
$get_wget_path http://hostingraja.info/AISA_DATA/makeaisa/aisa
chmod 755 aisa
wget -O csf_port_enable_tcpin.sh http://hostingraja.info/AISA_DATA/csf_port_enable_tcpin.sh
$get_sh_path /root/scripts/makeaisa/csf_port_enable_tcpin.sh 8010
csf -r
PHP_PATH=`whereis php  | awk '{print $2}'`
EXT_PATH=`$PHP_PATH -i | grep extension_dir | awk 'NR == 1' | cut -d' ' -f3`
cd $EXT_PATH

PHPVersion=$(php -v|grep --only-matching --perl-regexp "5\.\\d+\.\\d+");
if [[ $PHPVersion =~ "5.2" ]]
then
	ZEND_GUARD_PATH='php-5-2'	
elif [[ $PHPVersion =~ "5.3" ]]
then
	ZEND_GUARD_PATH='php-5-3'	
elif [[ $PHPVersion =~ "5.4" ]]
then
	ZEND_GUARD_PATH='php-5-4'
elif [[ $PHPVersion =~ "5.5" ]]
then
	ZEND_GUARD_PATH='php-5-5'
elif [[ $PHPVersion =~ "5.6" ]]
then
	ZEND_GUARD_PATH='php-5-6'
fi

#wget -O ZendGuardLoader.so http://hostingraja.info/AISA_DATA/ZendGuardLoader.so
wget -O ZendGuardLoader.so http://hostingraja.info/AISA_DATA/zendguard/$ZEND_GUARD_PATH/ZendGuardLoader.so
sed -i '/ZendGuardLoader/d' /etc/php.ini
echo "zend_extension = $EXT_PATH/ZendGuardLoader.so" >> /etc/php.ini
service httpd restart
/root/scripts/makeaisa/aisa >> /root/scripts/aisa/aisa.log &
exit 0