trying to figure out how i would tell if a service is running from the watchdog...
[xmppcentral.git] / lib / watchDog.php
index a488950..2ea8dd7 100644 (file)
@@ -4,9 +4,9 @@ class watchDog {
        function go()
        {
                // my job is to keep daemons running.
+               $lhms = new hostManagementServer();
+               $lss = new systemServer();
                while(true) {
-                       $lhms = new hostManagementServer();
-                       $lss = new systemServer();
                        
                        if(!$lhms->isRunning()) {
                                startHMS();
@@ -15,6 +15,8 @@ class watchDog {
                        if(!$lss->isRunning()) {
                                startSS();
                        }
+                       
+                       sleep(5);
                }               
        }