added some code for actually starting some stuff!
[xmppcentral.git] / sms / sms.php
index 4ac0d58..46ec901 100644 (file)
@@ -1,9 +1,20 @@
 <?php
 
-// sms will start up and do two things
+// sms will start up and do two things TODO need to remove hardcoding of config.php
+require_once("../etc/config.php");
 
-// first it will fork the host management server, which will connect to the xmpp server and talk to system.
 
-// if the xmpp server is localhots or the hostname of it, it'll also spawn the system user too
+// our job is to now go into an watchdog loop
+// on first execution, this should create the ss and hms objects
+$pf3 = pcntl_fork();
+if($pf3 == -1) {
+       echo "Failed to fork\n";
+} else if($pf3) {
+       // parent
+} else {
+       // child
+       $wd = new watchDog();
+       $wd->go();
+}
 
 ?>
\ No newline at end of file