diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2021-03-14 11:15:06 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2021-03-14 11:15:06 +0100 |
commit | 4cc470390848393350c54b2fbb7fac3a74c83de4 (patch) | |
tree | 15740093c6e1b1454555ccfa7918112e388a23e5 | |
parent | 6152ea8349eacb5a3ef498ff9ca7c32043ea24ec (diff) |
Add option to change config file path
-rw-r--r-- | src/sip/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sip/main.c b/src/sip/main.c index 4270eb6..de528f4 100644 --- a/src/sip/main.c +++ b/src/sip/main.c @@ -69,6 +69,9 @@ static void print_help() /* - - */ printf(" -h --help\n"); printf(" This help\n"); + printf(" --config [~/]<path to config file>\n"); + printf(" Give a config file to use. If it starts with '~/', path is at home dir.\n"); + printf(" Each line in config file is one option, '-' or '--' must not be given!\n"); printf(" -v --verbose <level> | <level>,<category>[,<category>[,...]] | list\n"); printf(" Use 'list' to get a list of all levels and categories\n"); printf(" Verbose level: digit of debug level (default = '%d')\n", debuglevel); @@ -299,7 +302,7 @@ int main(int argc, char *argv[]) /* handle options / config file */ add_options(); - rc = options_config_file("~/.osmocom/sip/sip.conf", handle_options); + rc = options_config_file(argc, argv, "~/.osmocom/sip/sip.conf", handle_options); if (rc < 0) return 0; argi = options_command_line(argc, argv, handle_options); |