From 7584988f4eef212145d0f1127a80cd7337f8d843 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 13 Oct 2023 01:09:24 +0200 Subject: [PATCH] Continued: - no need for these checks anymore --- nodeinfo.sh | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/nodeinfo.sh b/nodeinfo.sh index 4084a9b..8c3e370 100755 --- a/nodeinfo.sh +++ b/nodeinfo.sh @@ -6,40 +6,24 @@ SOFTWARE_LIST="" if [ "$1" = "--help" ] then - echo "Usage: $0 [file|--software|--software2|--software3|--nodeinfo|--generator|--detection|--no-auto|--timeout]" + echo "Usage: $0 [file|--software|--nodeinfo|--generator|--timeout]" exit 255 elif [ -n "$1" -a -f "$1" ] then DOMAINS=$(cat "$1") MODE="file" -elif [ "$1" = "--software" ] -then - DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE software IS NULL ORDER BY last_updated ASC;") - MODE="software" elif [ "$1" = "--nodeinfo" ] then DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE software IS NULL AND nodeinfo_url IS NOT NULL ORDER BY last_updated ASC;") MODE="nodeinfo" -elif [ "$1" = "--detection" ] -then - DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE detection_mode IS NULL ORDER BY last_updated ASC;") - MODE="detection" -elif [ "$1" = "--no-auto" ] -then - DOMAINS=`sqlite3 blocks.db "SELECT domain FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'peertube', 'takahe', 'gotosocial', 'brighteon', 'wildebeest', 'bookwyrm', 'mitra', 'areionskey', 'mammuthus') AND detection_mode != 'AUTO_DISCOVERY' ORDER BY last_updated ASC;"` - MODE="noauto2" elif [ "$1" = "--timeout" ] then DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE last_error_details LIKE '%Timeout%' ORDER BY last_updated ASC;") - MODE="software" -elif [ "$1" = "--software2" ] -then - DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE software IS NOT NULL AND detection_mode IS NULL ORDER BY last_updated ASC;") - MODE="software2" -elif [ "$1" = "--software3" -a -f "software.txt" ] + MODE="timeout" +elif [ "$1" = "--software" -a -f "software.txt" ] then SOFTWARE_LIST=$(cat software.txt) - MODE="software3" + MODE="software" elif [ "$1" = "--generator" ] then DOMAINS=$(sqlite3 blocks.db "SELECT domain FROM instances WHERE detection_mode='GENERATOR' ORDER BY last_updated ASC;") -- 2.39.5