diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index d0d8dbd..b63ade9 100644 --- a/src/config.c +++ b/src/config.c @@ -62,6 +62,9 @@ static void default_config(fastd_config *conf) { conf->protocol = &fastd_protocol_null; conf->secret = NULL; conf->peers = NULL; + + conf->on_up = NULL; + conf->on_up_dir = NULL; } static bool config_match(const char *opt, ...) { @@ -319,6 +322,16 @@ void fastd_configure(fastd_context *ctx, fastd_config *conf, int argc, char *con continue; } + IF_OPTION_ARG("--on-up") { + free(conf->on_up); + free(conf->on_up_dir); + + conf->on_up = strdup(arg); + conf->on_up_dir = get_current_dir_name(); + + continue; + } + IF_OPTION("--generate-key") { keygen = true; continue; |