diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-10 17:42:08 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-10 17:42:08 +0100 |
commit | 519972c9c18a103a7689844150c75e939c642115 (patch) | |
tree | 4d3def2563b7547b318f0e6f62ed1b3917ee7487 /src/fastd.c | |
parent | b7fec238bd094d70df001c069cb9ac11056f907c (diff) | |
download | fastd-519972c9c18a103a7689844150c75e939c642115.tar fastd-519972c9c18a103a7689844150c75e939c642115.zip |
Make --verify-config option more flexible
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/fastd.c b/src/fastd.c index 9115bbf..1f80939 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -882,6 +882,11 @@ int main(int argc, char *argv[]) { fastd_configure(&ctx, &conf, argc, argv); ctx.conf = &conf; + if (conf.verify_config) { + fastd_config_verify(&ctx, &conf); + exit(0); + } + if (conf.generate_key) { conf.protocol->generate_key(&ctx); exit(0); @@ -896,12 +901,10 @@ int main(int argc, char *argv[]) { init_signals(&ctx); - if (!conf.verify_config) { - if (conf.daemon) - status_fd = daemonize(&ctx); + if (conf.daemon) + status_fd = daemonize(&ctx); - init_log(&ctx); - } + init_log(&ctx); #ifdef HAVE_LIBSODIUM sodium_init(); @@ -915,9 +918,6 @@ int main(int argc, char *argv[]) { fastd_config_check(&ctx, &conf); - if (conf.verify_config) - exit(0); - update_time(&ctx); ctx.next_keepalives = fastd_in_seconds(&ctx, conf.keepalive_interval); |