Make backup copy of MMDVM.ini before overwriting with new config
This commit is contained in:
parent
c24b9af234
commit
b469c0f380
1 changed files with 3 additions and 0 deletions
|
@ -59,16 +59,19 @@ if (defined("JSONNETWORK")) {
|
||||||
$key = recursive_array_search($netname,$networks);
|
$key = recursive_array_search($netname,$networks);
|
||||||
$network = $networks[$key];
|
$network = $networks[$key];
|
||||||
setDMRNetwork($network['label']);
|
setDMRNetwork($network['label']);
|
||||||
|
exec( "sudo cp ".MMDVMINIPATH."/".MMDVMINIFILENAME." ".MMDVMINIPATH."/".MMDVMINIFILENAME .".bak" );
|
||||||
exec( "sudo cp ".MMDVMINIPATH."/".$network['ini'].".ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
exec( "sudo cp ".MMDVMINIPATH."/".$network['ini'].".ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
||||||
exec( REBOOTMMDVM );
|
exec( REBOOTMMDVM );
|
||||||
} else {
|
} else {
|
||||||
if ($_GET['network'] == "DMRPLUS") {
|
if ($_GET['network'] == "DMRPLUS") {
|
||||||
setDMRNetwork("DMRplus");
|
setDMRNetwork("DMRplus");
|
||||||
|
exec( "sudo cp ".MMDVMINIPATH."/".MMDVMINIFILENAME." ".MMDVMINIPATH."/".MMDVMINIFILENAME .".bak" );
|
||||||
exec( "sudo cp ".MMDVMINIPATH."/DMRPLUS.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
exec( "sudo cp ".MMDVMINIPATH."/DMRPLUS.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
||||||
exec( REBOOTMMDVM );
|
exec( REBOOTMMDVM );
|
||||||
}
|
}
|
||||||
if ($_GET['network'] == "BRANDMEISTER") {
|
if ($_GET['network'] == "BRANDMEISTER") {
|
||||||
setDMRNetwork("BrandMeister");
|
setDMRNetwork("BrandMeister");
|
||||||
|
exec( "sudo cp ".MMDVMINIPATH."/".MMDVMINIFILENAME." ".MMDVMINIPATH."/".MMDVMINIFILENAME .".bak" );
|
||||||
exec( "sudo cp ".MMDVMINIPATH."/BRANDMEISTER.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
exec( "sudo cp ".MMDVMINIPATH."/BRANDMEISTER.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
||||||
exec( REBOOTMMDVM );
|
exec( REBOOTMMDVM );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue