From 35e35dfe71c30813be2b44fd968e939f88568f43 Mon Sep 17 00:00:00 2001 From: zefie Date: Wed, 12 Feb 2025 17:13:22 -0500 Subject: [PATCH] remove this old gem, if its still needed it can be retrieved from git --- zefie_wtvp_minisrv/migrate_accounts.js | 27 -------------------------- 1 file changed, 27 deletions(-) delete mode 100644 zefie_wtvp_minisrv/migrate_accounts.js diff --git a/zefie_wtvp_minisrv/migrate_accounts.js b/zefie_wtvp_minisrv/migrate_accounts.js deleted file mode 100644 index b1304403..00000000 --- a/zefie_wtvp_minisrv/migrate_accounts.js +++ /dev/null @@ -1,27 +0,0 @@ -var classPath = __dirname + "/includes/"; -const { WTVShared } = require(classPath + "WTVShared.js"); -const wtvshared = new WTVShared(); // creates minisrv_config -classPath = wtvshared.getAbsolutePath(classPath, __dirname); -const WTVClientSessionData = require(classPath + "/WTVClientSessionData.js"); -minisrv_config = wtvshared.getMiniSrvConfig(); - -const wtvcsd = new WTVClientSessionData(minisrv_config) - -const fs = require('fs') -const path = require('path') - - -var old_account_dir = minisrv_config.config.SessionStore; -var new_account_dir = wtvcsd.getAccountStoreDirectory(); -if (!fs.existsSync(new_account_dir)) fs.mkdirSync(new_account_dir); - -total = 0; - -fs.readdirSync(old_account_dir).forEach(file => { - if (file === "accounts" || file === "minisrv_internal_nntp" || file === "client registration and session data will populate here.txt") return; - fs.renameSync(old_account_dir + path.sep + file, new_account_dir + path.sep + file) - console.log(" * Migrated", old_account_dir + path.sep + file, "to", new_account_dir + path.sep + file); - total++; -}); - -console.log(" *", total, "accounts migrated."); \ No newline at end of file