*/
int main(int argc, char *argv[])
{
- // initialize Config class
+ // Initialize Config class and get the command line parameters
Config * config = new Config;
int ret_val = config->parse_cmd_line(argc,argv);
if(ret_val == 1)
{
+ // usage
config->print_usage();
return 0;
}
else if(ret_val == 2)
{
+ // version
ostringstream version_string;
version_string << VERSION << "." << REVISION << "." << RELEASE;
config->print_version(version_string.str());
return 0;
}
- // initialize Updater
+ string config_path = "/home/bjoern/bpdyndnsd"; // TODO: standard config path should be /etc/bpdyndnsd if not specified other on command line
+ ret_val = config->load_config_from_files(config_path);
+ if(ret_val == 3)
+ {
+ cout << "See manpage for config file structure." << endl;
+ }
+ else if(ret_val == 4)
+ {
+ return 0;
+ }
+ // initialize Updater
Updater * updater = new Updater(config);
-
updater->update_services();
- cout << "Hello World" << endl;
-
return 0;
}