diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 6b3f2747d2..56b1ca055c 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -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]); + } }