From: frrobert2 Date: Thu, 10 Jun 2021 20:34:10 +0000 (-0400) Subject: will not look for favicon.txt by default X-Git-Url: https://software.frrobert.com/lace/commitdiff_plain/64396bf88321c2592088dcd0c50e45b25d5d8180 will not look for favicon.txt by default --- diff --git a/laced b/laced index debf547..91314a4 100755 --- a/laced +++ b/laced @@ -90,20 +90,22 @@ function timeline() { url="$url/" fi domain=$(sed 's/\/.*$//' <<< "$domain") - fav=$(timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"gemini://$domain/favicon.txt" 2>/dev/null | sed -e '1d') + timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"$url" 2>/dev/null > $tmpfile3 timeoutstatus=${PIPESTATUS[0]} if [ $timeoutstatus -ne 124 ];then - if [ ! -z "$fav" ];then - user="$fav $user" - fi - timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"$url" 2>/dev/null > $tmpfile3 - local newuser=$(cat $tmpfile3 | grep -m 1 author: | awk -F ":" '{print $2}' ) + local newuser=$(cat $tmpfile3 | grep -m 1 author: | awk -F ":" '{print $2}' ) local newavatar=$(cat $tmpfile3 | grep -m 1 avatar: | awk -F ":" '{print $2}' ) if [[ $newuser != "" ]] then newuser=$(echo "$newuser" | xargs) newavatar=$(echo "$newavatar" | xargs) user="$newavatar $newuser" + else + fav=$(timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"gemini://$domain/favicon.txt" 2>/dev/null | sed -e '1d') +if [ ! -z "$fav" ];then + user="$fav $user" + fi + fi @@ -130,6 +132,7 @@ function timeline() { wordcount="$(wc -c $tmpfile | awk '{print $1}')" if [[ "$wordcount" > 100 ]]; then cp $tmpfile $config_place/microblogs.gmi + cp $tmpfile /mnt/geminiserver/gemini/lace.gmi else sed -i '1i Laced could not connect to the Internet showing previous download' $config_place/microblogs.gmi