2 * @brief Config class implementation. This class represents the actual configuration.
6 * @copyright Intra2net AG
12 #include "service_dhs.hpp"
13 #include "service_ods.hpp"
14 #include "service_dyndns.hpp"
15 #include "service_dyns.hpp"
16 #include "service_easydns.hpp"
17 #include "service_tzo.hpp"
18 #include "service_zoneedit.hpp"
19 #include "service_gnudip.hpp"
25 #include <boost/foreach.hpp>
26 #include <boost/filesystem.hpp>
27 #include <boost/regex.hpp>
28 #include <boost/algorithm/string.hpp>
31 namespace po = boost::program_options;
32 namespace fs = boost::filesystem;
33 namespace ba = boost::algorithm;
35 typedef boost::shared_ptr<boost::program_options::options_description> Options_descriptionPtr;
41 * Default Constructor. Available command line and config file options with their default values are defined here.
45 , ServiceHolder(new Serviceholder)
50 , ConfigPath("/etc/bpdyndnsd")
53 , ExternalWarningLog("")
54 , ExternalWarningLevel(0)
56 , WebcheckEnabled(false)
57 , ExternalLogOnlyOnce(false)
59 // Available service description config options
60 po::options_description opt_desc_service("Service description options");
61 opt_desc_service.add_options()
62 ("protocol",po::value<string>(),"The service protocol.")
63 ("server",po::value<string>(),"Servername needed for gnudip protocol.")
64 ("host",po::value<string>(),"The hostname to update.")
65 ("login",po::value<string>(),"Login name.")
66 ("password",po::value<string>(),"Corresponding password.")
67 ("update_interval",po::value<int>()->default_value(-1),"Update interval in minutes.")
68 ("max_updates_within_interval",po::value<int>()->default_value(-1),"How many updates can be made in one interval.")
69 ("dns_cache_ttl",po::value<int>()->default_value(-1),"How long a dns record is valid.")
72 // Available command line only options
73 po::options_description opt_desc_cmd_only("Command line only options");
74 opt_desc_cmd_only.add_options()
75 ("help,?","Show help.")
76 ("version,v","Show version.")
77 ("config,c",po::value<string>()->default_value("/etc/bpdyndnsd"),"Set the config path.")
80 // Available generic options. Valid on cmd or in config file.
81 po::options_description opt_desc_generic("Generic config options");
82 opt_desc_generic.add_options()
83 ("daemon_mode",po::value<bool>()->default_value(false),"Run as system daemon.")
84 ("loglevel",po::value<int>()->default_value(0),"Loglevel.")
85 ("syslog",po::value<bool>()->default_value(false),"Use syslog facility.")
86 ("enable_ipv6",po::value<bool>()->default_value(false),"Try to use IPv6.")
87 ("webcheck_enabled",po::value<bool>()->default_value(false),"Use webcheck url to determine actual IP address.")
88 ("webcheck_url",po::value<string>()->default_value(""),"Use this URL to determine IP.")
89 ("webcheck_url_alt",po::value<string>()->default_value(""),"Use this alternative URL to determine IP.")
90 ("webcheck_interval",po::value<int>()->default_value(10),"The webcheck interval in minutes.")
91 ("http_proxy",po::value<string>(),"Use this proxy for all http requests.")
92 ("http_proxy_port",po::value<int>(),"Port of the proxy.")
93 ("external_warning_log",po::value<string>()->default_value(""),"External programm to pass warning log messages to.")
94 ("external_warning_level",po::value<int>()->default_value(0),"Warning messages of which loglevel should be passed to external programm.")
95 ("external_log_only_once",po::value<bool>()->default_value(false),"Log the same external message only once until next reload or restart.")
96 ("start_offline",po::value<bool>()->default_value(false),"Start in offline mode.")
99 // Define valid command line parameters
100 OptDescCmd = Options_descriptionPtr(new po::options_description("Command line options"));
101 OptDescCmd->add(opt_desc_cmd_only);
102 OptDescCmd->add(opt_desc_generic);
103 OptDescCmd->add(opt_desc_service);
105 // Define valid config file options
106 OptDescConfMain = Options_descriptionPtr(new po::options_description("Config file options"));
107 OptDescConfMain->add(opt_desc_generic);
109 // Define valid service file options
110 OptDescConfService = Options_descriptionPtr(new po::options_description("Service file options"));
111 OptDescConfService->add(opt_desc_service);
116 * Constructor with Logger and Serviceholder objects. Available command line and config file options with their default values are defined here.
118 Config::Config(Logger::Ptr _log, Serviceholder::Ptr _serviceholder)
120 , ServiceHolder(_serviceholder)
125 , ConfigPath("/etc/bpdyndnsd")
126 , WebcheckInterval(0)
128 , ExternalWarningLog("")
129 , ExternalWarningLevel(0)
130 , StartOffline(false)
131 , WebcheckEnabled(false)
132 , ExternalLogOnlyOnce(false)
134 // Available service description config options
135 po::options_description opt_desc_service("Service description options");
136 opt_desc_service.add_options()
137 ("protocol",po::value<string>(),"The service protocol.")
138 ("server",po::value<string>(),"Servername needed for gnudip protocol.")
139 ("host",po::value<string>(),"The hostname to update.")
140 ("login",po::value<string>(),"Login name.")
141 ("password",po::value<string>(),"Corresponding password.")
142 ("update_interval",po::value<int>()->default_value(-1),"Update interval in minutes.")
143 ("max_updates_within_interval",po::value<int>()->default_value(-1),"How many updates can be made in one interval.")
144 ("dns_cache_ttl",po::value<int>()->default_value(-1),"How long a dns record is valid.")
147 // Available command line only options
148 po::options_description opt_desc_cmd_only("Command line only options");
149 opt_desc_cmd_only.add_options()
150 ("help,?","Show help.")
151 ("version,v","Show version.")
152 ("config,c",po::value<string>()->default_value("/etc/bpdyndnsd"),"Set the config path.")
155 // Available generic options. Valid on cmd or in config file.
156 po::options_description opt_desc_generic("Generic config options");
157 opt_desc_generic.add_options()
158 ("daemon_mode",po::value<bool>()->default_value(false),"Run as system daemon.")
159 ("loglevel",po::value<int>()->default_value(0),"Loglevel.")
160 ("syslog",po::value<bool>()->default_value(false),"Use syslog facility.")
161 ("enable_ipv6",po::value<bool>()->default_value(false),"Try to use IPv6.")
162 ("webcheck_enabled",po::value<bool>()->default_value(false),"Use webcheck url to determine actual IP address.")
163 ("webcheck_url",po::value<string>()->default_value(""),"Use this URL to determine IP.")
164 ("webcheck_url_alt",po::value<string>()->default_value(""),"Use this alternative URL to determine IP.")
165 ("webcheck_interval",po::value<int>()->default_value(10),"The webcheck interval in minutes.")
166 ("http_proxy",po::value<string>(),"Use this proxy for all http requests.")
167 ("http_proxy_port",po::value<int>(),"Port of the proxy.")
168 ("external_warning_log",po::value<string>()->default_value(""),"External programm to pass warning log messages to.")
169 ("external_warning_level",po::value<int>()->default_value(0),"Warning messages of which loglevel should be passed to external programm.")
170 ("external_log_only_once",po::value<bool>()->default_value(false),"Log the same external message only once until next reload or restart.")
171 ("start_offline",po::value<bool>()->default_value(false),"Start in offline mode.")
174 // Define valid command line parameters
175 OptDescCmd = Options_descriptionPtr(new po::options_description("Command line options"));
176 OptDescCmd->add(opt_desc_cmd_only);
177 OptDescCmd->add(opt_desc_generic);
178 OptDescCmd->add(opt_desc_service);
180 // Define valid config file options
181 OptDescConfMain = Options_descriptionPtr(new po::options_description("Config file options"));
182 OptDescConfMain->add(opt_desc_generic);
184 // Define valid service file options
185 OptDescConfService = Options_descriptionPtr(new po::options_description("Service file options"));
186 OptDescConfService->add(opt_desc_service);
199 * Parses the command line arguments and does the needed actions.
200 * @param argc Command line argument number given to main.
201 * @param argv[] Pointer to command line argument array given to main.
202 * @return 0 if all is fine, -1 if not.
204 int Config::parse_cmd_line(int argc, char *argv[])
208 po::store(po::parse_command_line(argc, argv, *this->OptDescCmd), VariablesMap);
209 po::notify(VariablesMap);
211 if ( VariablesMap.count("help") )
213 Log->print_usage(OptDescCmd);
216 else if ( VariablesMap.count("version") )
218 Log->print_version();
222 // Create a service object if all needed options are set on the command line
223 if ( VariablesMap.count("protocol") && VariablesMap.count("host") && VariablesMap.count("login") && VariablesMap.count("password") )
225 // Get the cmd parameter values for protocol host login and password
226 string protocol = VariablesMap["protocol"].as<string>();
227 string host = VariablesMap["host"].as<string>();
228 string login = VariablesMap["login"].as<string>();
229 string password = VariablesMap["password"].as<string>();
231 protocol = ba::to_lower_copy(protocol);
234 if ( VariablesMap.count("server") )
235 server = VariablesMap["server"].as<string>();
237 int update_interval = 0;
238 if ( VariablesMap.count("update_interval") )
239 update_interval = VariablesMap["update_interval"].as<int>();
241 int max_updates_within_interval = 0;
242 if ( VariablesMap.count("max_updates_within_interval") )
243 max_updates_within_interval = VariablesMap["max_updates_within_interval"].as<int>();
245 int dns_cache_ttl = 0;
246 if ( VariablesMap.count("dns_cache_ttl") )
247 dns_cache_ttl = VariablesMap["dns_cache_ttl"].as<int>();
249 Service::Ptr service = create_service(protocol,server,host,login,password,update_interval,max_updates_within_interval,dns_cache_ttl);
252 ServiceHolder->add_service(service);
253 Log->print_service_object("New Service object from command line options:", service->get_protocol(), service->get_hostname(), service->get_login() ,service->get_password(), service->get_update_interval(), service->get_max_updates_within_interval(), service->get_dns_cache_ttl() , service->get_actual_ip(), service->get_last_updates());
257 Log->print_invalid_service_config();
260 else if ( VariablesMap.count("protocol") || VariablesMap.count("host") || VariablesMap.count("login") || VariablesMap.count("password") )
262 Log->print_missing_cmd_service_option();
263 Log->print_usage(OptDescCmd);
267 if ( VariablesMap.count("config") )
269 fs::path full_config_path = fs::system_complete(fs::path(VariablesMap["config"].as<string>()));
270 ConfigPath = full_config_path.string();
271 if ( !fs::exists(full_config_path) || !fs::is_directory(full_config_path) )
273 // Config path doesn't exist or is not a directory
274 Log->print_error_config_path(ConfigPath);
279 if ( VariablesMap.count("daemon_mode") )
280 DaemonMode = VariablesMap["daemon_mode"].as<bool>();
282 if ( VariablesMap.count("loglevel") )
283 Loglevel = VariablesMap["loglevel"].as<int>();
285 if ( VariablesMap.count("syslog") )
286 Syslog = VariablesMap["syslog"].as<bool>();
288 if ( VariablesMap.count("enable_ipv6") )
289 EnableIPv6 = VariablesMap["enable_ipv6"].as<bool>();
291 if ( VariablesMap.count("webcheck_enabled") )
292 WebcheckEnabled = VariablesMap["webcheck_enabled"].as<bool>();
294 if ( VariablesMap.count("webcheck_url") )
295 WebcheckIpUrl = VariablesMap["webcheck_url"].as<string>();
297 if ( VariablesMap.count("webcheck_url_alt") )
298 WebcheckIpUrlAlt = VariablesMap["webcheck_url_alt"].as<string>();
300 if ( VariablesMap.count("webcheck_interval") )
301 WebcheckInterval = VariablesMap["webcheck_interval"].as<int>();
303 if ( VariablesMap.count("http_proxy") && VariablesMap.count("http_proxy_port") )
305 Proxy = VariablesMap["http_proxy"].as<string>();
306 ProxyPort = VariablesMap["http_proxy_port"].as<int>();
308 else if ( VariablesMap.count("http_proxy") || VariablesMap.count("http_proxy_port") )
310 Log->print_missing_cmd_proxy_option();
311 Log->print_usage(OptDescCmd);
315 if ( VariablesMap.count("external_warning_log") )
316 ExternalWarningLog = VariablesMap["external_warning_log"].as<string>();
318 if ( VariablesMap.count("external_warning_level") )
319 ExternalWarningLevel = VariablesMap["external_warning_level"].as<int>();
321 if ( VariablesMap.count("external_log_only_once") )
322 ExternalLogOnlyOnce = VariablesMap["external_log_only_once"].as<bool>();
324 if ( VariablesMap.count("start_offline") )
325 StartOffline = VariablesMap["start_offline"].as<bool>();
328 catch( const po::unknown_option& e )
330 Log->print_unknown_cmd_option(e.what());
331 Log->print_usage(OptDescCmd);
334 catch( const po::multiple_occurrences& e )
336 Log->print_multiple_cmd_option(e.what());
337 Log->print_usage(OptDescCmd);
340 catch( const po::error& e )
342 Log->print_error_parsing_cmd(e.what());
343 Log->print_usage(OptDescCmd);
351 * Creates a Service object from the given parameters.
352 * @param protocol Protocol to use.
353 * @param host Hostname to update.
354 * @param login Login.
355 * @param password Password.
356 * @return A pointer to the created Service object.
358 Service::Ptr Config::create_service(const string &protocol, const string& server, const string& hostname, const string& login, const string& password, const int update_interval, const int max_updates_within_interval, const int dns_cache_ttl)
360 // Test for valid hostname. Must contain 3 parts minimum.
361 list<string> fqhn_parts;
362 ba::split(fqhn_parts,hostname,boost::is_any_of("."));
363 if ( fqhn_parts.size() < 3 )
365 Log->print_invalid_hostname(hostname);
366 Service::Ptr service;
370 if(protocol == "dhs")
372 Service::Ptr service_dhs(new ServiceDhs(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort));
375 else if(protocol == "ods")
377 Service::Ptr service_ods(new ServiceOds(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl));
380 else if(protocol == "dyndns")
382 Service::Ptr service_dyndns(new ServiceDyndns(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort));
383 return service_dyndns;
385 else if(protocol == "dyns")
387 Service::Ptr service_dyns(new ServiceDyns(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort));
390 else if(protocol == "easydns")
392 Service::Ptr service_easydns(new ServiceEasydns(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort));
393 return service_easydns;
395 else if(protocol == "tzo")
397 Service::Ptr service_tzo(new ServiceTzo(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort));
400 else if(protocol == "zoneedit")
402 Service::Ptr service_zoneedit(new ServiceZoneedit(protocol,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort));
403 return service_zoneedit;
405 else if(protocol == "gnudip")
407 if ( !server.empty() )
409 Service::Ptr service_gnudip(new ServiceGnudip(protocol,server,hostname,login,password,Log,update_interval,max_updates_within_interval,dns_cache_ttl,Proxy,ProxyPort));
410 return service_gnudip;
414 Log->print_gnudip_requires_servername();
415 Service::Ptr service;
421 Log->print_unknown_protocol(protocol);
422 Service::Ptr service;
429 * Loads a service config file, invoked by load_config_from_files.
430 * @param full_filename Filename of the service config file to load.
431 * @return 0 if all is fine, -1 otherwise.
433 int Config::load_service_config_file(const string& full_filename)
435 Log->print_load_service_conf(full_filename);
437 ifstream service_config_file(full_filename.c_str(),ifstream::in);
438 if(service_config_file.is_open())
442 po::variables_map vm;
443 po::parsed_options parsed_service_options = po::parse_config_file(service_config_file,*this->OptDescConfService,true);
444 po::store(parsed_service_options,vm);
447 if(vm.count("protocol") && vm.count("host") && vm.count("login") && vm.count("password"))
449 // create the corresponding service
450 string protocol = vm["protocol"].as<string>();
451 string host = vm["host"].as<string>();
452 string login = vm["login"].as<string>();
453 string password = vm["password"].as<string>();
455 protocol = ba::to_lower_copy(protocol);
458 if ( vm.count("server") )
459 server = vm["server"].as<string>();
461 int update_interval = 0;
462 if ( vm.count("update_interval") )
463 update_interval = vm["update_interval"].as<int>();
465 int max_updates_within_interval = 0;
466 if ( vm.count("max_updates_within_interval") )
467 max_updates_within_interval = vm["max_updates_within_interval"].as<int>();
469 int dns_cache_ttl = 0;
470 if ( vm.count("dns_cache_ttl") )
471 dns_cache_ttl = vm["dns_cache_ttl"].as<int>();
473 Service::Ptr service = create_service(protocol,server,host,login,password,update_interval,max_updates_within_interval,dns_cache_ttl);
476 ServiceHolder->add_service(service);
477 Log->print_service_object("New Service object from config:", service->get_protocol(), service->get_hostname(), service->get_login() ,service->get_password(), service->get_update_interval(), service->get_max_updates_within_interval(), service->get_dns_cache_ttl() , service->get_actual_ip(), service->get_last_updates());
481 Log->print_invalid_service_config();
484 else if ( vm.count("protocol") || vm.count("host") || vm.count("login") || vm.count("password") )
486 service_config_file.close();
487 Log->print_missing_service_conf_option(full_filename);
491 catch( const po::unknown_option& e )
493 // unknown option in config file detected
494 service_config_file.close();
495 Log->print_unknown_service_conf_option(full_filename,e.what());
498 catch( const po::multiple_occurrences& e )
500 service_config_file.close();
501 Log->print_multiple_service_conf_option(full_filename,e.what());
504 catch( const po::error& e )
506 service_config_file.close();
507 Log->print_error_parsing_config_file(full_filename,e.what());
510 service_config_file.close();
514 // error opening service config file for reading
515 Log->print_error_opening_r(full_filename);
523 * Loads the main config file, invoked by load_config_from_files
524 * @param full_filename The full filename of the main config file to load
525 * @return 0 if all is fine, -1 otherwise
527 int Config::load_main_config_file(const string& full_filename)
529 Log->print_load_main_conf(full_filename);
531 ifstream main_config_file(full_filename.c_str(),ifstream::in);
532 if(main_config_file.is_open())
536 po::parsed_options parsed_main_options = po::parse_config_file(main_config_file,*this->OptDescConfMain,true);
537 po::store(parsed_main_options,VariablesMap);
538 po::notify(VariablesMap);
540 if ( VariablesMap.count("daemon_mode") )
541 DaemonMode = VariablesMap["daemon_mode"].as<bool>();
543 if ( VariablesMap.count("loglevel") )
544 Loglevel = VariablesMap["loglevel"].as<int>();
546 if ( VariablesMap.count("syslog") )
547 Syslog = VariablesMap["syslog"].as<bool>();
549 if ( VariablesMap.count("enable_ipv6") )
550 EnableIPv6 = VariablesMap["enable_ipv6"].as<bool>();
552 if ( VariablesMap.count("webcheck_enabled") )
553 WebcheckEnabled = VariablesMap["webcheck_enabled"].as<bool>();
555 if ( VariablesMap.count("webcheck_url") )
556 WebcheckIpUrl = VariablesMap["webcheck_url"].as<string>();
558 if ( VariablesMap.count("webcheck_url_alt") )
559 WebcheckIpUrlAlt = VariablesMap["webcheck_url_alt"].as<string>();
561 if ( VariablesMap.count("webcheck_interval") )
562 WebcheckInterval = VariablesMap["webcheck_interval"].as<int>();
564 if ( VariablesMap.count("http_proxy") && VariablesMap.count("http_proxy_port") )
566 Proxy = VariablesMap["http_proxy"].as<string>();
567 ProxyPort = VariablesMap["http_proxy_port"].as<int>();
569 else if ( VariablesMap.count("http_proxy") || VariablesMap.count("http_proxy_port") )
571 main_config_file.close();
572 Log->print_missing_conf_proxy_option(full_filename);
576 if ( VariablesMap.count("external_warning_log") )
577 ExternalWarningLog = VariablesMap["external_warning_log"].as<string>();
579 if ( VariablesMap.count("external_warning_level") )
580 ExternalWarningLevel = VariablesMap["external_warning_level"].as<int>();
582 if ( VariablesMap.count("external_log_only_once") )
583 ExternalLogOnlyOnce = VariablesMap["external_log_only_once"].as<bool>();
585 if ( VariablesMap.count("start_offline") )
586 StartOffline = VariablesMap["start_offline"].as<bool>();
589 catch( const po::unknown_option& e ) // at the moment 04-08-2009 this exception is never thrown :-(
591 // unknown option in main config file detected
592 main_config_file.close();
593 Log->print_unknown_main_conf_option(e.what());
596 catch( const po::multiple_occurrences& e )
598 main_config_file.close();
599 Log->print_multiple_main_conf_option(full_filename,e.what());
602 main_config_file.close();
606 // error opening main config file for reading
607 Log->print_error_opening_r(full_filename);
615 * Loads the main and the service config file and does the needed action.
616 * @param config_path The path to the config directory.
617 * @return 0 if all is fine, -1 otherwise
619 int Config::load_config_from_files()
621 fs::path full_config_path = fs::path(ConfigPath);
623 fs::directory_iterator end_iter;
624 for ( fs::directory_iterator dir_itr(full_config_path) ; dir_itr != end_iter ; ++dir_itr )
626 if( fs::is_regular_file( dir_itr->status() ) )
628 string actual_file = dir_itr->path().filename();
629 boost::regex expr(".*\\.conf?");
630 // If it is the main config file do the following
631 if ( actual_file == "bpdyndnsd.conf" )
633 // Load the main config file
634 string full_filename = dir_itr->path().string();
635 if ( load_main_config_file(full_filename) != 0 )
638 // If it is a service definition file *.conf, parse it and generate the corresponding service
639 else if ( boost::regex_search( actual_file,expr ) )
641 string full_filename = dir_itr->path().string();
642 if ( load_service_config_file(full_filename) != 0 )
647 // Config file successfully loaded
648 Log->print_conf_loaded(ConfigPath);
654 * Getter method for member OptDescCmd.
655 * @return options_description*.
657 Options_descriptionPtr Config::get_opt_desc_cmd() const
664 * Getter method for member OptDescConfMain.
665 * @return options_description*.
667 Options_descriptionPtr Config::get_opt_desc_conf_main() const
669 return OptDescConfMain;
674 * Getter method for member OptDescConfService.
675 * @return options_description*.
677 Options_descriptionPtr Config::get_opt_desc_conf_service() const
679 return OptDescConfService;
684 * Getter for member Loglevel.
685 * @return Member Loglevel.
687 int Config::get_loglevel() const
694 * Getter for member DaemonMode.
695 * @return TRUE if enabled, FALSE if disabled.
697 bool Config::get_daemon_mode() const
704 * Deletes the map with the previously parsed options.
705 * This is needed in case we reload the config and don't want the old cmd options to overwrite new config file options.
707 void Config::delete_variables_map()
709 VariablesMap.clear();
711 po::variables_map _variables_map;
712 VariablesMap = _variables_map;
717 * Getter for member Syslog.
718 * @return True if logging through syslog is enabled, false otherwise.
720 bool Config::get_syslog() const
727 * Getter for member EnableIPv6
728 * @return Wether IPv6 should be used or not.
730 bool Config::get_enable_ipv6() const
737 * Getter for member WebcheckEnabled
738 * @return Is webcheck enabled by default.
740 bool Config::get_webcheck_enabled() const
742 return WebcheckEnabled;
747 * Setter for member WebcheckEnabled
748 * @return Is webcheck enabled by default.
750 void Config::set_webcheck_enabled( bool webcheck_enabled )
752 WebcheckEnabled = webcheck_enabled;
757 * Getter for member WebcheckIpUrl
758 * @return The primary IP Webcheck URL
760 string Config::get_webcheck_ip_url() const
762 return WebcheckIpUrl;
767 * Getter for member WebcheckIpUrlAlt
768 * @return The alternative IP Webcheck URL
770 string Config::get_webcheck_ip_url_alt() const
772 return WebcheckIpUrlAlt;
777 * Get member WebcheckInterval
778 * @return WebcheckInterval
780 int Config::get_webcheck_interval() const
782 return WebcheckInterval;
790 string Config::get_proxy() const
797 * Get member ProxyPort
800 int Config::get_proxy_port() const
807 * Get member ExternalWarningLog
808 * @return ExternalWarningLog
810 string Config::get_external_warning_log() const
812 return ExternalWarningLog;
817 * Get member ExternalWarningLevel
818 * @return ExternalWaringLevel
820 int Config::get_external_warning_level() const
822 return ExternalWarningLevel;
827 * Get member StartOffline
828 * @return StartOffline
830 bool Config::get_start_offline() const
837 * Get member ExternalLogOnlyOnce
838 * @return StartOffline
840 bool Config::get_external_log_only_once() const
842 return ExternalLogOnlyOnce;