. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ ##|+PRIV ##|*IDENT=page-diagnostics-rebootsystem ##|*NAME=Diagnostics: Reboot System ##|*DESCR=Allow access to the 'Diagnostics: Reboot System' page. ##|*MATCH=diag_reboot.php* ##|-PRIV // Set DEBUG to true to prevent the system_reboot() function from being called define("DEBUG", false); require_once("guiconfig.inc"); require_once("functions.inc"); require_once("captiveportal.inc"); $guitimeout = 90; // Seconds to wait before reloading the page after reboot $guiretry = 20; // Seconds to try again if $guitimeout was not long enough $pgtitle = array(gettext("Diagnostics"), gettext("Reboot")); include("head.inc"); if (($_SERVER['REQUEST_METHOD'] == 'POST') && ($_POST['override'] != "yes")) { if (DEBUG) { print_info_box(gettext("Not actually rebooting (DEBUG is set true)."), 'success'); } else { print('
');
		system_reboot();
		print('
'); } ?>