#!/bin/bash
set -e
curl -sS -o /dev/null -w "images %{http_code}\n" "https://ot.whiteantidote.com/images/true.png"
curl -sS -o /dev/null -w "guild_logo %{http_code}\n" "https://ot.whiteantidote.com/guild_logos/default_main_logo.gif"
curl -sS -o /tmp/outfit.gif -w "outfit %{http_code} size=%{size_download}\n" "https://ot.whiteantidote.com/animatedOutfits1092/animoutfit.php?id=128&addons=0&head=1&body=1&legs=1&feet=1"
curl -sS -o /dev/null -w "downloads %{http_code}\n" "https://ot.whiteantidote.com/Downloads/"
# BEGIN CHANGE: OTC updater assets
curl -sS -o /dev/null -w "files-otc %{http_code}\n" "https://ot.whiteantidote.com/files-otc/"
curl -sS -o /dev/null -w "updater %{http_code}\n" -X POST -H "Content-Type: application/json" -d '{}' "https://ot.whiteantidote.com/api/updater.php"
# END CHANGE
curl -sS -o /dev/null -w "api_home %{http_code}\n" "https://ot.whiteantidote.com/api/home.php"
file /tmp/outfit.gif | head -1
cd /home/ubuntu/portal/api
php -r 'require "lib.php"; echo "HTML=".WA_HTML_ROOT."\nLOGOS=".WA_GUILD_LOGOS_PATH."\n"; echo waLoadSiteConfig() ? "config_ok\n" : "config_fail\n";'