diff --git a/src/etc/inc/ipsec.inc b/src/etc/inc/ipsec.inc index d64c9ce6c..397034583 100644 --- a/src/etc/inc/ipsec.inc +++ b/src/etc/inc/ipsec.inc @@ -27,6 +27,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +require_once("xmlparse.inc"); /* IPsec defines */ $ipsec_loglevels = array("dmn" => "Daemon", "mgr" => "SA Manager", "ike" => "IKE SA", "chd" => "IKE Child SA", @@ -316,12 +317,12 @@ function ipsec_phase1_status($ipsec_status, $ikeid) { function ipsec_smp_dump_status() { global $config, $g, $custom_listtags; - if (!file_exists("{$g['varrun_path']}/charon.xml")) { + if (!file_exists("/var/run/charon.xml")) { log_error("IPsec daemon seems to have issues or not running!"); return; } - $fd = @fsockopen("unix://{$g['varrun_path']}/charon.xml"); + $fd = @fsockopen("unix:///var/run/charon.xml"); if (!$fd) { log_error("Could not read status from ipsec"); return; diff --git a/src/www/shortcuts.inc b/src/www/shortcuts.inc index 85162d6da..38f85a3a6 100644 --- a/src/www/shortcuts.inc +++ b/src/www/shortcuts.inc @@ -87,10 +87,7 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service = break; } if(!empty($link) && ($_SERVER['REQUEST_URI'] != "/{$link}")) - if ($_SERVER['REQUEST_URI'] != "/status_services.php") - return "{$space}Main page"; - else - return "{$space}"; + return "{$space}"; } function get_shortcut_status_link($shortcut_section, $addspace = true, $service = array()) { @@ -114,20 +111,14 @@ function get_shortcut_status_link($shortcut_section, $addspace = true, $service break; } if(!empty($link)) - if ($_SERVER['REQUEST_URI'] != "/status_services.php") - return "{$space}Status"; - else - return "{$space}"; + return "{$space}"; } function get_shortcut_log_link($shortcut_section, $addspace = true) { global $g, $shortcuts; $space = ($addspace) ? " " : "" ; if(!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])) { - if ($_SERVER['REQUEST_URI'] != "/status_services.php") - return "{$space}Log"; - else - return "{$space}"; + return "{$space}"; } } diff --git a/src/www/status_services.php b/src/www/status_services.php index 34a03f7e7..3a9b67759 100755 --- a/src/www/status_services.php +++ b/src/www/status_services.php @@ -49,10 +49,6 @@ if (!empty($service_name)) { sleep(5); } -/* batch mode, allow other scripts to call this script */ -if($_GET['batch']) - exit; - $pgtitle = array(gettext("Status"),gettext("Services")); include("head.inc"); diff --git a/src/www/vpn_ipsec.php b/src/www/vpn_ipsec.php index 5be1ae695..94fae5ee8 100644 --- a/src/www/vpn_ipsec.php +++ b/src/www/vpn_ipsec.php @@ -451,7 +451,7 @@ include("head.inc");