From 5667a5bb1dec6c15e46ab917773433b19db39c89 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 3 Sep 2017 02:11:10 +0530 Subject: Check bot authentication details. * apod-bot.sh: Make API request just to check if bot username/password are valid. --- apod-bot.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apod-bot.sh b/apod-bot.sh index f05b8fb..5bd3952 100755 --- a/apod-bot.sh +++ b/apod-bot.sh @@ -19,6 +19,9 @@ bot_password=secret-password-here apod_base_url=https://apod.nasa.gov/apod +# Check if the bot username/password are correct +curl -sSfu "$bot_username:$bot_password" -o /dev/null $social_api_url/statuses/home_timeline.json + # Download HTML page, and scrape required information apod_html=$(curl -sS $apod_base_url/astropix.html) -- cgit v1.2.3