mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Run shell or earlyshellcmd even if iit's not an array
This commit is contained in:
parent
53dfd34e36
commit
245388b446
@ -741,10 +741,17 @@ function system_do_shell_commands($early = 0) {
|
||||
$cmdn = "shellcmd";
|
||||
|
||||
if (is_array($config['system'][$cmdn])) {
|
||||
|
||||
|
||||
/* *cmd is an array, loop through */
|
||||
foreach ($config['system'][$cmdn] as $cmd) {
|
||||
exec($cmd);
|
||||
}
|
||||
|
||||
} elseif($config['system'][$cmdn] <> "") {
|
||||
|
||||
/* execute single item */
|
||||
exec($config['system'][$cmdn]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user