|
|
@@ -59,7 +59,9 @@ class ChangePassword extends AddonController
|
|
|
$container['cipassword'] = $params['password'];
|
|
|
$this->vm()->updateConfig($container);
|
|
|
//restart
|
|
|
- if (!Job::waiting()->ofJob(RebootVmJob::class)->ofHostingId($this->getWhmcsParamByKey("serviceid"))->count())
|
|
|
+ if ($this->configuration()->isRebootVmAfterChangePackage() &&
|
|
|
+ $this->vm()->isRunning() &&
|
|
|
+ !Job::waiting()->ofJob(RebootVmJob::class)->ofHostingId($this->getWhmcsParamByKey("serviceid"))->count())
|
|
|
{
|
|
|
queue(RebootVmJob::class, [], null, "hosting", $this->getWhmcsParamByKey("serviceid"));
|
|
|
}
|