38 lines
770 B
Bash
Executable File
38 lines
770 B
Bash
Executable File
#!/bin/sh
|
|
|
|
LOGO_FILE="/var/gemini-data/logos/gemhltv_main"
|
|
# ^^^^^^^^ path to file containing the text to be displayed at the top of the
|
|
# page
|
|
|
|
CGI_BIN="/var/gemini/cgi-bin"
|
|
# ^^^^^ 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 ""
|
|
}
|
|
|
|
|
|
if [ "$QUERY_STRING" = "news" ]
|
|
then
|
|
print_header
|
|
/var/gemini/cgi-bin/gemhltv_news
|
|
elif [ "$QUERY_STRING" = "matches" ]
|
|
then
|
|
print_header
|
|
$CGI_BIN/gemhltv_matches
|
|
elif [ "$QUERY_STRING" = "reload" ]
|
|
then
|
|
curl "https://illegaldrugs.net/skor?reload" >/dev/null
|
|
echo "30 ?matches"
|
|
else
|
|
print_header
|
|
$CGI_BIN/gemhltv_matches
|
|
fi
|