mirror of https://github.com/MISP/MISP
commit
207e09df64
|
@ -315,13 +315,13 @@ class AdminShell extends AppShell
|
||||||
|
|
||||||
public function runUpdates() {
|
public function runUpdates() {
|
||||||
$whoami = exec('whoami');
|
$whoami = exec('whoami');
|
||||||
if ($whoami === 'httpd' || $whoami === 'www-data' || $whoami === 'apache') {
|
if ($whoami === 'httpd' || $whoami === 'www-data' || $whoami === 'apache' || $whoami === 'wwwrun') {
|
||||||
echo 'Executing all updates to bring the database up to date with the current version.' . PHP_EOL;
|
echo 'Executing all updates to bring the database up to date with the current version.' . PHP_EOL;
|
||||||
$processId = $this->args[0];
|
$processId = $this->args[0];
|
||||||
$this->Server->runUpdates(true, false, $processId);
|
$this->Server->runUpdates(true, false, $processId);
|
||||||
echo 'All updates completed.' . PHP_EOL;
|
echo 'All updates completed.' . PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
die('This OS user is not allowed to run this command.'. PHP_EOL. 'Run it under `www-data` or `httpd`.' . PHP_EOL . 'You tried to run this command as: ' . $whoami . PHP_EOL);
|
die('This OS user is not allowed to run this command.'. PHP_EOL. 'Run it under `www-data` or `httpd` or `apache` or `wwwrun`.' . PHP_EOL . 'You tried to run this command as: ' . $whoami . PHP_EOL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue