|
Directory : /scripts2/ |
# /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