summaryrefslogtreecommitdiffstats
path: root/inc/trigger.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/trigger.inc.php')
-rw-r--r--inc/trigger.inc.php45
1 files changed, 3 insertions, 42 deletions
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index 8ed098fc..134bab53 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -94,37 +94,6 @@ class Trigger
}
/**
- * Launch all ldadp instances that need to be running.
- *
- * @param int $exclude if not NULL, id of config module NOT to start
- * @param string $parent if not NULL, this will be the parent task of the launch-task
- * @return boolean|string false on error, id of task otherwise
- */
- public static function ldadp($exclude = NULL, $parent = NULL)
- {
- // TODO: Fetch list from ConfigModule_AdAuth (call loadDb first)
- $res = Database::simpleQuery("SELECT DISTINCT moduleid FROM configtgz_module"
- . " INNER JOIN configtgz_x_module USING (moduleid)"
- . " INNER JOIN configtgz USING (configid)"
- . " INNER JOIN configtgz_location USING (configid)"
- . " WHERE moduletype IN ('AdAuth', 'LdapAuth')");
- $id = array();
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
- if (!is_null($exclude) && (int)$row['moduleid'] === (int)$exclude)
- continue;
- $id[] = (int)$row['moduleid'];
- }
- $task = Taskmanager::submit('LdadpLauncher', array(
- 'ids' => $id,
- 'parentTask' => $parent,
- 'failOnParentFail' => false
- ));
- if (!isset($task['id']))
- return false;
- return $task['id'];
- }
-
- /**
* Mount the VM store into the server.
*
* @param array $vmstore VM Store configuration to use. If false, read from properties
@@ -220,6 +189,9 @@ class Trigger
return $parent;
}
+ /**
+ * Stop any daemons that might be sitting on the VMstore, or database.
+ */
public static function stopDaemons($parent, &$taskids)
{
$parent = self::triggerDaemons('stop', $parent, $taskids);
@@ -235,15 +207,4 @@ class Trigger
return $parent;
}
- public static function startDaemons($parent, &$taskids)
- {
- $parent = self::triggerDaemons('start', $parent, $taskids);
- $taskid = self::ldadp($parent);
- if ($taskid !== false) {
- $taskids['ldadpid'] = $taskid;
- $parent = $taskid;
- }
- return $parent;
- }
-
}