function nas_mount_delete($id, $umount, $regen = true) { global $db; $m = nas_get_mount_by_id($id); $vps = new vps_load($m["vps_id"]); $vps->info(); if ($umount && !$m["default"] && $vps->ve["vps_up"]) { $vps->umount($m); } $db->query("DELETE FROM vps_mount WHERE id = '" . $db->check($id) . "'"); if ($regen && !$m["default"]) { $vps->mount_regen(); } }
function start_all_vpses() { global $db; while ($row = $db->findByColumn("vps", "m_id", $this->m["m_id"])) { $vps = new vps_load($row["vps_id"]); $vps->info(); if (!$vps->ve["vps_up"]) { $vps->start(); } } }