Skip to content

Commit

Permalink
Fix #3
Browse files Browse the repository at this point in the history
Adding inventory update call after successfully added new vCenter
  • Loading branch information
vmdude committed Sep 8, 2015
1 parent 8a67e39 commit 9889fd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions var/www/admin/credstore.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
<span class="sr-only">Success:</span>';
echo shell_exec("/usr/lib/vmware-vcli/apps/general/credstore_admin.pl --credstore /var/www/.vmware/credstore/vicredentials.xml add --server " . $_POST["input-vcenter"] . " --username " . $_POST["input-username"] . " --password " . escapeshellcmd($_POST["input-password"]));
// Once newly vCenter has been added, we want the inventory to be updated
shell_exec("sudo /bin/bash /var/www/scripts/updateInventory.sh");
echo ' </div>';
echo '<script type="text/javascript">setTimeout(function(){ location.replace("credstore.php"); }, 1000);</script>';
}
Expand Down

0 comments on commit 9889fd5

Please sign in to comment.