X-Git-Url: http://git.pjr.cc/?p=CBFWR.git;a=blobdiff_plain;f=bin%2Fcbfwrd.php;h=4bf1513629d802470f6148af049edc205568ee14;hp=3b2987015833f4447399c32120aee6037ad63c6c;hb=175dadf56670772f8d889276df67471354a36f21;hpb=9d42ecae8d0c5139e119af983a5fe65f4b0fe149 diff --git a/bin/cbfwrd.php b/bin/cbfwrd.php index 3b29870..4bf1513 100644 --- a/bin/cbfwrd.php +++ b/bin/cbfwrd.php @@ -19,8 +19,17 @@ glcas_pluginLoader(); error_log("CBFWRD starting"); + $config = new Config(); +if(isset($argv[1])) { + if($argv[1] == "boot") { + // we get called here on boot. + $config->bootHardware(); + exit(0); + } +} + // now we got into daemon modes $cont = true; @@ -30,12 +39,12 @@ $cont = true; while($cont) { $comms = new Comms; + $config->loadConfig(); $comms->putConfig($config->getConfig()); $msg = $comms->waitForMessage(); //echo "Got message: $msg\n"; - - $cont = false; + if($msg == "quit") $cont = false; } ?> \ No newline at end of file