@ -9,7 +9,7 @@ the captured output to SITE_NAME:</p>
< div class = "highlight" > < pre > < span > < / span > < code > < span class = "ch" > #!/bin/sh< / span >
< div class = "highlight" > < pre > < span > < / span > < code > < span class = "ch" > #!/bin/sh< / span >
< span class = "nv" > m< / span > < span class = "o" > =< / span > < span class = "k" > $(< / span > /usr/bin/certbot renew < span class = "m" > 2< / span > > < span class = "p" > & < / span > < span class = "m" > 1< / span > < span class = "k" > )< / span >
< span class = "nv" > m< / span > < span class = "o" > =< / span > < span class = "k" > $(< / span > /usr/bin/certbot renew < span class = "m" > 2< / span > > < span class = "p" > & < / span > < span class = "m" > 1< / span > < span class = "k" > )< / span >
curl -fsS --retry < span class = "m" > 3< / span > -X POST - -data-raw < span class = "s2" > " < / span > < span class = "nv" > $m< / span > < span class = "s2" > " < / span > PING_URL
curl -fsS --retry < span class = "m" > 3< / span > --data-raw < span class = "s2" > " < / span > < span class = "nv" > $m< / span > < span class = "s2" > " < / span > PING_URL
< / code > < / pre > < / div >
< / code > < / pre > < / div >
@ -23,12 +23,12 @@ depending on the exit code:</p>
< span class = "nv" > m< / span > < span class = "o" > =< / span > < span class = "k" > $(< / span > /usr/bin/certbot renew < span class = "m" > 2< / span > > < span class = "p" > & < / span > < span class = "m" > 1< / span > < span class = "k" > )< / span >
< span class = "nv" > m< / span > < span class = "o" > =< / span > < span class = "k" > $(< / span > /usr/bin/certbot renew < span class = "m" > 2< / span > > < span class = "p" > & < / span > < span class = "m" > 1< / span > < span class = "k" > )< / span >
< span class = "k" > if< / span > < span class = "o" > [< / span > < span class = "nv" > $?< / span > -ne < span class = "m" > 0< / span > < span class = "o" > ]< / span > < span class = "p" > ;< / span > < span class = "k" > then< / span > < span class = "nv" > url< / span > < span class = "o" > =< / span > < span class = "nv" > $url< / span > /fail< span class = "p" > ;< / span > < span class = "k" > fi< / span >
< span class = "k" > if< / span > < span class = "o" > [< / span > < span class = "nv" > $?< / span > -ne < span class = "m" > 0< / span > < span class = "o" > ]< / span > < span class = "p" > ;< / span > < span class = "k" > then< / span > < span class = "nv" > url< / span > < span class = "o" > =< / span > < span class = "nv" > $url< / span > /fail< span class = "p" > ;< / span > < span class = "k" > fi< / span >
curl -fsS --retry < span class = "m" > 3< / span > -X POST - -data-raw < span class = "s2" > " < / span > < span class = "nv" > $m< / span > < span class = "s2" > " < / span > < span class = "nv" > $url< / span >
curl -fsS --retry < span class = "m" > 3< / span > --data-raw < span class = "s2" > " < / span > < span class = "nv" > $m< / span > < span class = "s2" > " < / span > < span class = "nv" > $url< / span >
< / code > < / pre > < / div >
< / code > < / pre > < / div >
< h2 > All in One Line< / h2 >
< h2 > All in One Line< / h2 >
< p > Finally, all of the above can be packaged in a single line. The one-line
< p > Finally, all of the above can be packaged in a single line. The one-line
version can be put directly in crontab, without using a wrapper script.< / p >
version can be put directly in crontab, without using a wrapper script.< / p >
< div class = "highlight" > < pre > < span > < / span > < code > < span class = "nv" > m< / span > < span class = "o" > =< / span > < span class = "k" > $(< / span > /usr/bin/certbot renew < span class = "m" > 2< / span > > < span class = "p" > & < / span > < span class = "m" > 1< / span > < span class = "k" > )< / span > < span class = "p" > ;< / span > curl -fsS -X POST - -data-raw < span class = "s2" > " < / span > < span class = "nv" > $m< / span > < span class = "s2" > " < / span > < span class = "s2" > " PING_URL< / span > < span class = "k" > $(< / span > < span class = "o" > [< / span > < span class = "nv" > $?< / span > -ne < span class = "m" > 0< / span > < span class = "o" > ]< / span > < span class = "o" > & & < / span > < span class = "nb" > echo< / span > -n /fail< span class = "k" > )< / span > < span class = "s2" > " < / span >
< / code > < / pre > < / div >
< div class = "highlight" > < pre > < span > < / span > < code > < span class = "nv" > m< / span > < span class = "o" > =< / span > < span class = "k" > $(< / span > /usr/bin/certbot renew < span class = "m" > 2< / span > > < span class = "p" > & < / span > < span class = "m" > 1< / span > < span class = "k" > )< / span > < span class = "p" > ;< / span > curl -fsS --data-raw < span class = "s2" > " < / span > < span class = "nv" > $m< / span > < span class = "s2" > " < / span > < span class = "s2" > " PING_URL< / span > < span class = "k" > $(< / span > < span class = "o" > [< / span > < span class = "nv" > $?< / span > -ne < span class = "m" > 0< / span > < span class = "o" > ]< / span > < span class = "o" > & & < / span > < span class = "nb" > echo< / span > -n /fail< span class = "k" > )< / span > < span class = "s2" > " < / span >
< / code > < / pre > < / div >