Merge pull request #107 from marrold/master

Removes presumptions on MMDVMHost restart method.
This commit is contained in:
Kim - DG9VH 2017-03-13 14:50:37 +01:00 committed by GitHub
commit 9a31e4e693

View file

@ -56,19 +56,12 @@ include "../include/sysinfo.php";
if ($_GET['network'] == "DMRPLUS") { if ($_GET['network'] == "DMRPLUS") {
setDMRNetwork("DMRplus"); setDMRNetwork("DMRplus");
exec( "sudo cp ".MMDVMINIPATH."/DMRPLUS.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME ); exec( "sudo cp ".MMDVMINIPATH."/DMRPLUS.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
exec( "sudo killall MMDVMHost"); exec( REBOOTMMDVM );
sleep(1);
exec( "sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." > /dev/null 2>&1 &" );
// exec( "sudo killall MMDVMHost && sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." &");
// exec( "sudo /etc/init.d/start_mmdvm restart ");
} }
if ($_GET['network'] == "BRANDMEISTER") { if ($_GET['network'] == "BRANDMEISTER") {
setDMRNetwork("BrandMeister"); setDMRNetwork("BrandMeister");
exec( "sudo cp ".MMDVMINIPATH."/BRANDMEISTER.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME ); exec( "sudo cp ".MMDVMINIPATH."/BRANDMEISTER.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
exec( "sudo killall MMDVMHost"); exec( REBOOTMMDVM );
sleep(1);
exec( "sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." > /dev/null 2>&1 &" );
// exec( "sudo killall MMDVMHost && sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." &" );
} }
?> ?>
<div class="alert alert-info" role="alert">Switching network to <b><?php echo getDMRNetwork2() ?></b><br>Restarting in new selected network in progress</div> <div class="alert alert-info" role="alert">Switching network to <b><?php echo getDMRNetwork2() ?></b><br>Restarting in new selected network in progress</div>