Automatically migrate the API password hash and the lists of clients and domains to be excluded from setupVars.conf

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-01-08 21:21:38 +01:00
parent 1414e0d397
commit f199ac2f08
24 changed files with 376 additions and 305 deletions
+8 -29
View File
@@ -8,28 +8,26 @@
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
#include "../FTL.h"
#include "FTL.h"
#include "database-thread.h"
#include "common.h"
// [un]lock_shm();
#include "../shmem.h"
#include "shmem.h"
// parse_neighbor_cache()
#include "network-table.h"
// export_queries_to_disk()
#include "query-table.h"
#include "../config/config.h"
#include "../log.h"
#include "../timers.h"
#include "config/config.h"
#include "log.h"
#include "timers.h"
// global variable killed
#include "../signals.h"
#include "signals.h"
// reimport_aliasclients()
#include "aliasclients.h"
// Eventqueue routines
#include "../events.h"
#include "events.h"
// get_FTL_db_filesize()
#include "../files.h"
// read_blocking_status()
#include "../setupVars.h"
#include "files.h"
#define TIME_T "%li"
@@ -166,13 +164,6 @@ void *DB_thread(void *val)
// Intermediate cancellation-point
BREAK_IF_KILLED();
// Reload privacy level from pihole-FTL config
if(get_and_clear_event(RELOAD_PRIVACY_LEVEL))
getPrivacyLevel();
// Intermediate cancellation-point
BREAK_IF_KILLED();
// Import alias-clients
if(get_and_clear_event(REIMPORT_ALIASCLIENTS))
{
@@ -183,18 +174,6 @@ void *DB_thread(void *val)
BREAK_IF_KILLED();
// Inspect setupVars.conf to see if Pi-hole blocking is enabled
if(get_and_clear_event(RELOAD_BLOCKINGSTATUS))
read_blocking_status();
BREAK_IF_KILLED();
// Read blocking mode from pihole-FTL.toml
if(get_and_clear_event(RELOAD_BLOCKINGMODE))
getBlockingMode();
BREAK_IF_KILLED();
// Sleep 0.1 sec
thread_sleepms(DB, 100);
}