Again some bugfixing on switch-scripts
This commit is contained in:
parent
fe9da11a52
commit
e1352f3037
3 changed files with 25 additions and 5 deletions
|
@ -10,7 +10,14 @@ include "../config/config.php";
|
||||||
include("../config/networks.php");
|
include("../config/networks.php");
|
||||||
include "../include/tools.php";
|
include "../include/tools.php";
|
||||||
include "../include/functions.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 !== "") {
|
if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWORKPW !== "") {
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
@ -53,7 +60,6 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
checkSetup();
|
checkSetup();
|
||||||
//include "../include/sysinfo_ajax.php";
|
|
||||||
if (defined("JSONNETWORK")) {
|
if (defined("JSONNETWORK")) {
|
||||||
$netname = $_GET['network'];
|
$netname = $_GET['network'];
|
||||||
$key = recursive_array_search($netname,$networks);
|
$key = recursive_array_search($netname,$networks);
|
||||||
|
|
|
@ -9,7 +9,14 @@ $start = $time;
|
||||||
include "../config/config.php";
|
include "../config/config.php";
|
||||||
include "../include/tools.php";
|
include "../include/tools.php";
|
||||||
include "../include/functions.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 !== "") {
|
if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWORKPW !== "") {
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
|
|
@ -9,7 +9,14 @@ $start = $time;
|
||||||
include "../config/config.php";
|
include "../config/config.php";
|
||||||
include "../include/tools.php";
|
include "../include/tools.php";
|
||||||
include "../include/functions.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 !== "") {
|
if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWORKPW !== "") {
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
@ -53,7 +60,7 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO
|
||||||
<?php
|
<?php
|
||||||
$reflektor_nr=$_GET['reflector'];
|
$reflektor_nr=$_GET['reflector'];
|
||||||
checkSetup();
|
checkSetup();
|
||||||
include "../include/sysinfo.php";
|
|
||||||
exec( "sudo /bin/sed '/#Startup=/d' -i ".YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME);
|
exec( "sudo /bin/sed '/#Startup=/d' -i ".YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME);
|
||||||
exec( "sudo /bin/sed 's/Startup=.*$/Startup=".$reflektor_nr."/' -i ".YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME);
|
exec( "sudo /bin/sed 's/Startup=.*$/Startup=".$reflektor_nr."/' -i ".YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME);
|
||||||
exec( REBOOTYSFGATEWAY );
|
exec( REBOOTYSFGATEWAY );
|
||||||
|
|
Loading…
Reference in a new issue