gemhltv/gemhltv

38 lines
770 B
Plaintext
Raw Permalink Normal View History

2021-04-06 19:40:04 +00:00
#!/bin/sh
2021-04-07 04:02:26 +00:00
LOGO_FILE="/var/gemini-data/logos/gemhltv_main"
# ^^^^^^^^ path to file containing the text to be displayed at the top of the
# page
2021-04-06 19:40:04 +00:00
CGI_BIN="/var/gemini/cgi-bin"
2021-04-07 04:02:26 +00:00
# ^^^^^ parent folder of `gemhltv_matches` and `gemhltv_news`
print_header() {
echo "20 text/gemini"
echo '```'
cat $LOGO_FILE
echo '```'
echo ""
echo "=> ?news NEWS"
echo "=> ?matches MATCHES"
echo ""
}
2021-04-06 19:40:04 +00:00
if [ "$QUERY_STRING" = "news" ]
then
2021-04-07 04:02:26 +00:00
print_header
2021-04-06 23:55:27 +00:00
/var/gemini/cgi-bin/gemhltv_news
2021-04-06 19:40:04 +00:00
elif [ "$QUERY_STRING" = "matches" ]
then
2021-04-07 04:02:26 +00:00
print_header
2021-04-06 23:55:27 +00:00
$CGI_BIN/gemhltv_matches
2021-04-06 23:45:58 +00:00
elif [ "$QUERY_STRING" = "reload" ]
then
curl "https://illegaldrugs.net/skor?reload" >/dev/null
2021-04-07 04:02:26 +00:00
echo "30 ?matches"
2021-04-06 19:40:04 +00:00
else
2021-04-07 04:02:26 +00:00
print_header
2021-04-06 23:55:27 +00:00
$CGI_BIN/gemhltv_matches
2021-04-06 19:40:04 +00:00
fi