Ignore:
Timestamp:
06/16/11 21:26:48 (13 years ago)
Author:
tbretz
Message:
Added the --exec command.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/scheduler.cc

    r11030 r11043  
    783783
    784784    //io_service.SetReady();
     785    if (conf.Has("exec"))
     786    {
     787        const vector<string> v = conf.Get<vector<string>>("exec");
     788        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
     789            shell.Execute(*it);
     790    }
    785791
    786792    shell.Run();                 // Run the shell
     
    804810    po::options_description config("Configuration");
    805811    config.add_options()
    806         ("dns",               var<string>("localhost"),  "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
    807         ("log,l",             var<string>(n), "Write log-file")
    808         ("no-dim,d",          po_switch(),    "Disable dim services")
    809         ("console,c",         var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     812        ("dns",       var<string>("localhost"),  "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
     813        ("log,l",     var<string>(n), "Write log-file")
     814        ("no-dim,d",  po_switch(),    "Disable dim services")
     815        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     816        ("exec,e",    vars<string>(), "Execute one or more scrips at startup");
     817
     818    po::options_description control("Scheduler options");
     819    control.add_options()
    810820        ("schedule-database", var<string>()
    811821#if BOOST_VERSION >= 104200
     
    836846    conf.AddEnv("dns", "DIM_DNS_NODE");
    837847    conf.AddOptions(config);
     848    conf.AddOptions(control);
    838849    conf.SetArgumentPositions(p);
    839850}
Note: See TracChangeset for help on using the changeset viewer.