CLI: Add 'reseeder list' to list reseeds

This commit is contained in:
zzz
2025-02-10 13:24:20 -05:00
parent ef14eab6fd
commit 15185de087

View File

@ -1232,8 +1232,18 @@ public class Reseeder {
public static void main(String args[]) throws Exception {
if (args.length == 1 && args[0].equals("help")) {
System.out.println("Usage: reseeder [https://hostname/ ...]");
System.out.println(" reseeder list");
System.exit(1);
}
if (args.length == 1 && args[0].equals("list")) {
System.out.println("Configured reseeds:");
String[] urls = DataHelper.split(DEFAULT_SSL_SEED_URL, ",");
Arrays.sort(urls);
for (int i = 0; i < urls.length; i++) {
System.out.println(urls[i]);
}
System.exit(0);
}
File f = new File("certificates");
if (!f.exists()) {
System.out.println("Must be run from $I2P or have symlink to $I2P/certificates in this directory");