summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_backup.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-12-03 21:44:44 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-12-03 21:44:44 +0000
commit56825c0181bbde1e1c8c0fa0c500890f2a12ce8c (patch)
tree29baeaa6b31e475fc20b8328530f23d760ba863b /usr/local/www/diag_backup.php
parentc7c7be3fab4785890196d6373c49c73cec6dd270 (diff)
downloadpfsense-56825c0181bbde1e1c8c0fa0c500890f2a12ce8c.zip
pfsense-56825c0181bbde1e1c8c0fa0c500890f2a12ce8c.tar.gz
Reboot when restoring a m0n0wall configuration or if captive portal is enabled.
Diffstat (limited to 'usr/local/www/diag_backup.php')
-rwxr-xr-xusr/local/www/diag_backup.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index 5648a47..fcd5313 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -151,7 +151,7 @@ if ($_POST) {
conf_mount_rw();
touch("/needs_package_sync");
$reloadall = true;
- $savemsg = "The configuration has been restored. The firewall is now reloading..";
+ $savemsg = "The configuration has been restored. The firewall is now reloading.";
/* remove cache, we will force a config reload */
if(file_exists("/tmp/config.cache"))
unlink("/tmp/config.cache");
@@ -164,6 +164,11 @@ if ($_POST) {
write_config();
conf_mount_ro();
$savemsg = "The m0n0wall configuration has been restored and upgraded to pfSense.<p>The firewall is now rebooting.";
+ $reboot_needed = true;
+ }
+ if(isset($config['captiveportal']['enable'])) {
+ $savemsg = "The configuration has been restored.<p>The firewall is now rebooting.";
+ $reboot_needed = true;
}
} else {
$input_errors[] = "The configuration could not be restored.";
@@ -279,6 +284,11 @@ include("head.inc");
<?php
+if($reboot_needed == true) {
+ mwexec("/etc/rc.reboot");
+ exit;
+}
+
if($reloadall == true) {
if(file_exists("{$g['tmp_path']}/config.cache"))
OpenPOWER on IntegriCloud