Again some bugfixing on switch-scripts

This commit is contained in:
Kim Huebel 2017-09-22 15:49:32 +00:00
parent fe9da11a52
commit e1352f3037
3 changed files with 25 additions and 5 deletions

View file

@ -10,7 +10,14 @@ include "../config/config.php";
include("../config/networks.php");
include "../include/tools.php";
include "../include/functions.php";
include "../include/init.php";
//Some basic inits
$mmdvmconfigs = getMMDVMConfig();
if (!defined("MMDVMLOGPREFIX"))
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
if (!defined("TIMEZONE"))
define("TIMEZONE", "UTC");
if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWORKPW !== "") {
header('WWW-Authenticate: Basic realm="Dashboard"');
header('HTTP/1.0 401 Unauthorized');
@ -53,7 +60,6 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO
</div>
<?php
checkSetup();
//include "../include/sysinfo_ajax.php";
if (defined("JSONNETWORK")) {
$netname = $_GET['network'];
$key = recursive_array_search($netname,$networks);

View file

@ -9,7 +9,14 @@ $start = $time;
include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
include "../include/init.php";
//Some basic inits
$mmdvmconfigs = getMMDVMConfig();
if (!defined("MMDVMLOGPREFIX"))
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
if (!defined("TIMEZONE"))
define("TIMEZONE", "UTC");
if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWORKPW !== "") {
header('WWW-Authenticate: Basic realm="Dashboard"');
header('HTTP/1.0 401 Unauthorized');

View file

@ -9,7 +9,14 @@ $start = $time;
include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
include "../include/init.php";
//Some basic inits
$mmdvmconfigs = getMMDVMConfig();
if (!defined("MMDVMLOGPREFIX"))
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
if (!defined("TIMEZONE"))
define("TIMEZONE", "UTC");
if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWORKPW !== "") {
header('WWW-Authenticate: Basic realm="Dashboard"');
header('HTTP/1.0 401 Unauthorized');
@ -53,7 +60,7 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO
<?php
$reflektor_nr=$_GET['reflector'];
checkSetup();
include "../include/sysinfo.php";
exec( "sudo /bin/sed '/#Startup=/d' -i ".YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME);
exec( "sudo /bin/sed 's/Startup=.*$/Startup=".$reflektor_nr."/' -i ".YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME);
exec( REBOOTYSFGATEWAY );