summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorPoh Zi How <poh.zihow@gmail.com>2018-10-26 07:55:13 +0800
committerCosta Tsaousis <costa@tsaousis.gr>2018-10-26 02:55:13 +0300
commit6cf0d0c0169be2588ad2e199d911d7b10df58cb2 (patch)
tree9b7dde182a1090dc616f9e7006769fa51de9b0af /daemon
parentcdf57a00e1f1d8600bc0b90bf8f446ac475aef35 (diff)
add option to run netdata in the background (#4364)
* run netdata in foreground * add contributors * readd -D option * revert some changes * add explicit value for default case
Diffstat (limited to 'daemon')
-rw-r--r--daemon/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/main.c b/daemon/main.c
index a52104db18..b2c4c80bf5 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -228,6 +228,7 @@ struct option_def option_definitions[] = {
// opt description arg name default value
{ 'c', "Configuration file to load.", "filename", CONFIG_DIR "/" CONFIG_FILENAME},
{ 'D', "Do not fork. Run in the foreground.", NULL, "run in the background"},
+ { 'd', "Fork. Run in the background.", NULL, "run in the background"},
{ 'h', "Display this help message.", NULL, NULL},
{ 'P', "File to save a pid while running.", "filename", "do not save pid to a file"},
{ 'i', "The IP address to listen to.", "IP", "all IP addresses IPv4 and IPv6"},
@@ -729,6 +730,9 @@ int main(int argc, char **argv) {
case 'D':
dont_fork = 1;
break;
+ case 'd':
+ dont_fork = 0;
+ break;
case 'h':
return help(0);
case 'i':