Change to robots.txt template

This commit is contained in:
Mitchell Krog 2018-08-07 12:49:02 +02:00
parent a3732c8f00
commit fab74fc00a
No known key found for this signature in database
GPG key ID: EA1DD210CACCC45E

View file

@ -85,12 +85,15 @@ _endmarker="### Version Information ##"
# Create the robots.txt file # Create the robots.txt file
# ************************** # **************************
printf '%s\n%s\n%s%s\n%s%s\n%s%s\n%s\n%s\n\n%s\n%s\n%s\n' "$_startmarker" "###################################################" "### Version: " "$MY_GIT_TAG" "### Updated: " "$_now" "### Bad Bot Count: " "$BAD_BOTS" "###################################################" "$_endmarker" "User-agent: *" "Disallow: /wp-admin/" "Allow: /wp-admin/admin-ajax.php" >> "$_tmprobots" printf '###################################################################\n# The Ultimate robots.txt Bot and User-Agent Blocker\n# Copyright:\n# https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker\n###################################################################\n\n' >> "${_tmprobots}"
printf '%s\n%s\n%s%s\n%s%s\n%s%s\n%s\n%s\n\n%s\n%s\n%s\n' "$_startmarker" "###################################################" "### Version: " "$MY_GIT_TAG" "### Updated: " "$_now" "### Bad Bot Count: " "$BAD_BOTS" "###################################################" "$_endmarker" "User-agent: *" "Disallow: /wp-admin/" "Allow: /wp-admin/admin-ajax.php" >> "${_tmprobots}"
while IFS= read -r LINE while IFS= read -r LINE
do do
printf 'User-agent: %s\n%s\n' "${LINE}" "Disallow:/" >> "$_tmprobots" printf 'User-agent: %s\n%s\n' "${LINE}" "Disallow:/" >> "${_tmprobots}"
done < $_output done < $_output
printf '\n' >> "$_tmprobots" printf '\n' >> "${_tmprobots}"
sudo cp $_tmprobots $TRAVIS_BUILD_DIR/robots.txt/robots.txt sudo cp $_tmprobots $TRAVIS_BUILD_DIR/robots.txt/robots.txt
exit 0 exit 0