diff --git a/templates/docs/attaching_logs.html b/templates/docs/attaching_logs.html index de84e44a..c7846a0d 100644 --- a/templates/docs/attaching_logs.html +++ b/templates/docs/attaching_logs.html @@ -9,7 +9,7 @@ the captured output to SITE_NAME:

#!/bin/sh
 
 m=$(/usr/bin/certbot renew 2>&1)
-curl -fsS --retry 3 -X POST --data-raw "$m" PING_URL
+curl -fsS --retry 3 --data-raw "$m" PING_URL
 
@@ -23,12 +23,12 @@ depending on the exit code:

m=$(/usr/bin/certbot renew 2>&1) if [ $? -ne 0 ]; then url=$url/fail; fi -curl -fsS --retry 3 -X POST --data-raw "$m" $url +curl -fsS --retry 3 --data-raw "$m" $url

All in One Line

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.

-
m=$(/usr/bin/certbot renew 2>&1); curl -fsS -X POST --data-raw "$m" "PING_URL$([ $? -ne 0 ] && echo -n /fail)"
-
\ No newline at end of file +
m=$(/usr/bin/certbot renew 2>&1); curl -fsS --data-raw "$m" "PING_URL$([ $? -ne 0 ] && echo -n /fail)"
+
diff --git a/templates/docs/attaching_logs.md b/templates/docs/attaching_logs.md index dd134eae..d006a4ae 100644 --- a/templates/docs/attaching_logs.md +++ b/templates/docs/attaching_logs.md @@ -15,7 +15,7 @@ the captured output to SITE_NAME: #!/bin/sh m=$(/usr/bin/certbot renew 2>&1) -curl -fsS --retry 3 -X POST --data-raw "$m" PING_URL +curl -fsS --retry 3 --data-raw "$m" PING_URL ``` ## In Combination with the `/fail` Endpoint @@ -31,7 +31,7 @@ url=PING_URL m=$(/usr/bin/certbot renew 2>&1) if [ $? -ne 0 ]; then url=$url/fail; fi -curl -fsS --retry 3 -X POST --data-raw "$m" $url +curl -fsS --retry 3 --data-raw "$m" $url ``` ## All in One Line @@ -40,5 +40,5 @@ 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. ```bash -m=$(/usr/bin/certbot renew 2>&1); curl -fsS -X POST --data-raw "$m" "PING_URL$([ $? -ne 0 ] && echo -n /fail)" -``` \ No newline at end of file +m=$(/usr/bin/certbot renew 2>&1); curl -fsS --data-raw "$m" "PING_URL$([ $? -ne 0 ] && echo -n /fail)" +``` diff --git a/templates/docs/bash.html b/templates/docs/bash.html index e06607e2..a1e030ad 100644 --- a/templates/docs/bash.html +++ b/templates/docs/bash.html @@ -40,7 +40,7 @@ will accept and store first 10KB of the request body.

#!/bin/sh
 
 m=$(/usr/bin/certbot renew 2>&1)
-curl -fsS --retry 3 -X POST --data-raw "$m" PING_URL
+curl -fsS --retry 3 --data-raw "$m" PING_URL
 
@@ -62,4 +62,4 @@ register with SITE_NAME the first time they run.

# Finally, send a ping: curl --retry 3 $URL - \ No newline at end of file + diff --git a/templates/docs/bash.md b/templates/docs/bash.md index d8ae2be8..40455960 100644 --- a/templates/docs/bash.md +++ b/templates/docs/bash.md @@ -47,7 +47,7 @@ In the below example, certbot's output is captured and submitted via HTTP POST: #!/bin/sh m=$(/usr/bin/certbot renew 2>&1) -curl -fsS --retry 3 -X POST --data-raw "$m" PING_URL +curl -fsS --retry 3 --data-raw "$m" PING_URL ``` ## Auto-provisioning New Checks @@ -72,4 +72,4 @@ URL=`curl -s SITE_ROOT/api/v1/checks/ -H "X-Api-Key: $API_KEY" -d "$PAYLOAD" | # Finally, send a ping: curl --retry 3 $URL -``` \ No newline at end of file +```