Sh3ll



Directory :  /scripts2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Current File : //scripts2/add_robot_file_to_all_sites.sh
# /bin/bash

ROBOT="User-agent: *\nCrawl-Delay: 10"

for USER in `ls /var/cpanel/users/`
do
	rm /home/$USER/public_html/robot.txt
	if ! [ -f /home/$USER/public_html/robots.txt ]; then
		echo "Adding robots.txt to user $USER public_html"
		echo -e $ROBOT > /home/$USER/public_html/robots.txt
		chown $USER.$USER /home/$USER/public_html/robots.txt 
	else
		echo "robots.txt is already exist in user $USER"
	fi
done


Sh3LL