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;")