Only attempt to stop a container on Destroy() when it is in fact running

feature/node-rewrite
Sven Slootweg 13 years ago
parent 26d4e91b53
commit e03c2e7c39

@ -369,7 +369,11 @@ class Container extends CPHPDatabaseRecordClass
public function Destroy()
{
$this->Stop();
if($this->sCurrentStatus == CVM_STATUS_RUNNING)
{
$this->Stop();
}
$command = "vzctl destroy {$this->sInternalId}";
$result = $this->sNode->ssh->RunCommand($command, false);

Loading…
Cancel
Save