Add check for php and install if it isn't found

This commit is contained in:
Mathew Fleisch 2017-03-24 16:04:45 -07:00
parent f8614a3c1a
commit ac1c6020f9

View File

@ -28,7 +28,11 @@ echo " --------- BrowserBunny [started] -----------" >> $log_file
wget -q --tries=15 --timeout=5 --spider http://example.com
[[ "$?" -ne 0 ]] && { LED R; echo "Could not connect to the internet" >> $log_file; exit 1; }
LED R G
[[ ! `which phpp` ]] && { LED R; echo "Php not installed... install it!" >> $log_file; apt-get install -y php5-cli &>> $log_file; }
LED G
echo "Starting php server..." >> $log_file;
cd /root/udisk/payloads/switch1
php -S 172.16.64.1:80 &>> $log_file