tpws,nfqws: autohostlist reread on modify

This commit is contained in:
bol-van
2024-03-23 22:57:05 +03:00
parent b6ec750879
commit 14428cd545
36 changed files with 123 additions and 21 deletions

View File

@@ -54,8 +54,7 @@ void dohup(void)
{
if (bHup)
{
if (!LoadHostLists(&params.hostlist, &params.hostlist_files) ||
!LoadHostLists(&params.hostlist_exclude, &params.hostlist_exclude_files))
if (!LoadIncludeHostLists() || !LoadExcludeHostLists())
{
// what will we do without hostlist ?? sure, gonna die
exit(1);
@@ -717,13 +716,14 @@ void parse_params(int argc, char *argv[])
exit_clean(1);
}
if (!LoadHostLists(&params.hostlist, &params.hostlist_files))
if (*params.hostlist_auto_filename) params.hostlist_auto_mod_time = file_mod_time(params.hostlist_auto_filename);
if (!LoadIncludeHostLists())
{
fprintf(stderr, "Include hostlist load failed\n");
exit_clean(1);
}
if (*params.hostlist_auto_filename) NonEmptyHostlist(&params.hostlist);
if (!LoadHostLists(&params.hostlist_exclude, &params.hostlist_exclude_files))
if (!LoadExcludeHostLists())
{
fprintf(stderr, "Exclude hostlist load failed\n");
exit_clean(1);