2 * @brief The main function.
6 * @copyright Intra2net AG
22 #include <boost/foreach.hpp>
24 #include "updater.cpp"
28 #include "service.cpp"
35 typedef boost::shared_ptr<Updater> UpdaterPtr;
38 * @brief The main part.
39 * @param argc Number of arguments
40 * @param argv Command line arguments
41 * @return 0 if all is fine.
43 int main(int argc, char *argv[])
46 UpdaterPtr updater(new Updater);
48 // load the cmd options
49 if ( updater->init_config_from_cmd(argc,argv) != 0 )
52 // load the config and service files
53 if ( updater->init_config_from_files() != 0 )
56 // set the configured loggin facility, default stdout
58 // initialize daemon mode if configured
60 // update all configured services
61 updater->update_services();