$tab); $restartWarning = false; eval($switch); return !empty($restartWarning); } foreach (array('images', 'MQTT', 'telemetry', 'system', 'config', 'logging', 'network', 'mail', 'upload') as $tab) { check("saving the $tab tab asks for a restart", restart_for($tab), true); } foreach (array('web', 'API', 'highband', 'medband', 'lowband') as $tab) { check("saving the $tab tab does not ask for a restart", restart_for($tab), false); } echo $failures ? "\n$failures failed\n" : "\nall passed\n"; exit($failures ? 1 : 0);