nat: Allow to daemonize the NAT process
Add handling for the 'D' option
This commit is contained in:
parent
dc3a78f0c4
commit
27b6184225
|
@ -1368,6 +1368,7 @@ static void handle_options(int argc, char **argv)
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"help", 0, 0, 'h'},
|
{"help", 0, 0, 'h'},
|
||||||
{"debug", 1, 0, 'd'},
|
{"debug", 1, 0, 'd'},
|
||||||
|
{"daemonize", 0, 0, 'D'},
|
||||||
{"config-file", 1, 0, 'c'},
|
{"config-file", 1, 0, 'c'},
|
||||||
{"disable-color", 0, 0, 's'},
|
{"disable-color", 0, 0, 's'},
|
||||||
{"timestamp", 0, 0, 'T'},
|
{"timestamp", 0, 0, 'T'},
|
||||||
|
@ -1376,7 +1377,7 @@ static void handle_options(int argc, char **argv)
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
c = getopt_long(argc, argv, "hd:sTPc:m:l:",
|
c = getopt_long(argc, argv, "hd:sTPc:m:l:D",
|
||||||
long_options, &option_index);
|
long_options, &option_index);
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
|
@ -1392,6 +1393,9 @@ static void handle_options(int argc, char **argv)
|
||||||
case 'd':
|
case 'd':
|
||||||
log_parse_category_mask(osmo_stderr_target, optarg);
|
log_parse_category_mask(osmo_stderr_target, optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'D':
|
||||||
|
daemonize = 1;
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
config_file = strdup(optarg);
|
config_file = strdup(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue