From 69d0c479aaa05a153c9fbc571fe889669065641e Mon Sep 17 00:00:00 2001 From: 89wc <89wc@noreply.fsdfsd.net> Date: Mon, 4 Sep 2023 19:59:29 +0000 Subject: [PATCH] Update run --- run | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/run b/run index 761d34c..7d06a7f 100644 --- a/run +++ b/run @@ -7,30 +7,30 @@ while [ $count -lt $lim ]; do pid=$(cat pid); echo -n -e "${pid}\t" - url=$(./getlink.sh); + url=$(./getlink); # Pause execution if rate limit has been reached - if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 60 (1)"; sleep 60; url=$(./getlink.sh); - if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 600 (2)"; sleep 600; url=$(./getlink.sh); - if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 1140 (3)"; sleep 1140; url=$(./getlink.sh); - if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 2940 (4)"; sleep 2940; url=$(./getlink.sh); + if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 60 (1)"; sleep 60; url=$(./getlink); + if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 600 (2)"; sleep 600; url=$(./getlink); + if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 1140 (3)"; sleep 1140; url=$(./getlink); + if [ "$url" = "error rlimit" ]; then echo "rlimit.. sleeping 2940 (4)"; sleep 2940; url=$(./getlink); fi; fi; fi; fi; - # The ./getlink.sh checks for a 404. + # The ./getlink checks for a 404. # This continues a few post id's down to make sure it's really reached the end. # The post id will not be incremented if there are five 404's in a row. if [ "$url" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1)); - if [ "$(./getlink.sh $(( $pid+1 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); - if [ "$(./getlink.sh $(( $pid+2 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); - if [ "$(./getlink.sh $(( $pid+3 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); - if [ "$(./getlink.sh $(( $pid+4 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+1 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+2 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+3 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); + if [ "$(./getlink $(( $pid+4 )) )" = "error finish" ]; then echo -n " -finish- "; finishcount=$(( $finishcount + 1 )); fi; fi; fi; fi; echo " -ok- "; fi echo "$url"; - # If ./getlink.sh returns the URL, then it matched the pattern and the returned URL is the fixed one so it posts a comment. - if [ $(echo "$url" | cut -d ' ' -f1) != "error" ]; then echo "POST IT"; $(./reply_post.sh "$pid" "$url" > /dev/null); fi; + # If ./getlink returns the URL, then it matched the pattern and the returned URL is the fixed one so it posts a comment. + if [ $(echo "$url" | cut -d ' ' -f1) != "error" ]; then echo "POST IT"; $(./reply_post "$pid" "$url" > /dev/null); fi; # The post id will not be incremented if there are five 404's in a row. if [ $finishcount -gt 4 ]; then echo "finish counter: $finishcount"; sleep 60;