diff --git a/googlebot/start.sh b/googlebot/start.sh index 10406b13..93929929 100755 --- a/googlebot/start.sh +++ b/googlebot/start.sh @@ -10,8 +10,10 @@ ipv4_comma_output="googlebot/ipv4_comma.txt" ipv6_comma_output="googlebot/ipv6_comma.txt" timestamp_file="googlebot/timestamp.txt" -# Remove existing timestamp file -rm -f "$timestamp_file" +# Check if timestamp file exists and remove it +if [ -e "$timestamp_file" ]; then + rm "$timestamp_file" +fi # Download public GoogleBot IP ranges curl -s https://developers.google.com/search/apis/ipranges/googlebot.json > "$json_file"