Browse files

crudely detect and handle 503 errors

  • Loading branch information...
1 parent 46ac6e8 commit 02efb7702fb84dd68e61912fafa15badc50861de Zach Tatlock committed Mar 13, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 xpost.sh
View
6 xpost.sh
@@ -16,6 +16,12 @@ touch OLD
curl -s $FEED > NEW
date >> log
+if grep "Error 503" NEW > /dev/null; then
+ echo "* RSS DOWN!" >> log
+ rm NEW
+ exit 1
+fi
+
if ! diff OLD NEW > /dev/null; then
echo "* UPDATE!" >> log
cp NEW "$(date +%y%m%d-%H%M).rss"

0 comments on commit 02efb77

Please sign in to comment.