summaryrefslogtreecommitdiffstats
path: root/apis
diff options
context:
space:
mode:
authorSimon Rettberg2014-05-24 18:42:23 +0200
committerSimon Rettberg2014-05-24 18:42:23 +0200
commitee27ec0d2bc44fece8b438a4ea58ac956198d300 (patch)
tree29c7e34925d5525a60fcfca081725cd4a845e635 /apis
parentStuff (WIP) (diff)
downloadslx-admin-ee27ec0d2bc44fece8b438a4ea58ac956198d300.tar.gz
slx-admin-ee27ec0d2bc44fece8b438a4ea58ac956198d300.tar.xz
slx-admin-ee27ec0d2bc44fece8b438a4ea58ac956198d300.zip
WIP
Diffstat (limited to 'apis')
-rw-r--r--apis/taskmanager.inc.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apis/taskmanager.inc.php b/apis/taskmanager.inc.php
index 5994c018..78cd101c 100644
--- a/apis/taskmanager.inc.php
+++ b/apis/taskmanager.inc.php
@@ -1,6 +1,7 @@
<?php
require_once 'inc/taskmanager.inc.php';
+require_once 'inc/property.inc.php';
if (!is_array($_POST['ids'])) {
die('{"error" : "No Task ids given in POST data."}');
@@ -14,6 +15,12 @@ foreach ($_POST['ids'] as $id) {
continue;
}
$return[] = $status;
+ // HACK HACK - should be pluggable
+ if (isset($status['statusCode']) && $status['statusCode'] === TASK_FINISHED
+ && $status['id'] === Property::getIPxeTaskId() && Property::getServerIp() !== Property::getIPxeIp()) {
+ Property::setIPxeIp(Property::getServerIp());
+ }
+ //
if (!isset($status['statusCode']) || ($status['statusCode'] !== TASK_WAITING && $status['statusCode'] !== TASK_PROCESSING)) {
Taskmanager::release($id);
}