From ce4d969bcb82e0831dabc7f555083084f96da6f5 Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 28 Dec 2021 05:50:36 +0800 Subject: Renaming. --- netmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'netmon.c') diff --git a/netmon.c b/netmon.c index 206a85f..28f43fe 100644 --- a/netmon.c +++ b/netmon.c @@ -12,7 +12,7 @@ const char *logfile = "netmon.log"; int check_interval_seconds = 30; // seconds to sleep between checks int max_check_failure = 5; // how many failures to reboot the system -int be_daemonize = 0; // should run as a daemon process +int as_daemon = 0; // should run as a daemon process volatile int require_reboot = 0; void *logger = NULL; @@ -210,7 +210,7 @@ int main(int argc, char *argv[]) { logfile = argv[i + 1]; ++i; // skip next value } else if (!strcmp(argv[i], "-d")) { - be_daemonize = 1; + as_daemon = 1; } else { int invalid = strcmp(argv[i], "-h") != 0 && strcmp(argv[i], "--help") != 0; if (invalid) printf("Unrecognized parameter \"%s\".\n", argv[i]); @@ -222,7 +222,7 @@ int main(int argc, char *argv[]) { logger = log_init(logfile); log_debug(logger, "DEBUG logging is enabled."); - if (be_daemonize) { + if (as_daemon) { log_info(logger, "Daemonizing..."); daemonize(); } -- cgit v1.2.3