mvc: always do stop/start on forced restart

If 'nocheck' is used the service apears running and reload will
do nothing.
This commit is contained in:
Franco Fichtner 2024-11-11 12:32:54 +01:00
parent c30b46bd27
commit 8d0ab40c56

View File

@ -200,7 +200,7 @@ abstract class ApiMutableServiceControllerBase extends ApiControllerBase
if ($this->serviceEnabled()) {
$runStatus = $this->statusAction();
if ($runStatus['status'] != 'running') {
if ($runStatus['status'] != 'running' || $this->reconfigureForceRestart()) {
$backend->configdRun(escapeshellarg(static::$internalServiceName) . ' start');
} else {
$backend->configdRun(escapeshellarg(static::$internalServiceName) . ' reload');