make DMRNetwork-Information persistent over reboot of system

This commit is contained in:
dg9vh 2016-11-03 21:07:07 +00:00
parent 5cde533d5a
commit 339fabc749
3 changed files with 6 additions and 5 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
Links.txt Links.txt
config/config.php config/config.php
config/DMRNetwork.txt

View file

@ -39,14 +39,14 @@ function getFirmwareVersion() {
} }
function setDMRNetwork($network) { function setDMRNetwork($network) {
$fp = fopen('/tmp/DMRNetwork.txt', 'w'); $fp = fopen('../config/DMRNetwork.txt', 'w');
fwrite($fp, $network); fwrite($fp, $network);
fclose($fp); fclose($fp);
} }
function getDMRNetwork() { function getDMRNetwork() {
$fp = fopen('/tmp/DMRNetwork.txt', 'r'); $fp = fopen('config/DMRNetwork.txt', 'r');
$network = fread($fp, filesize("/tmp/DMRNetwork.txt")); $network = fread($fp, filesize("config/DMRNetwork.txt"));
fclose($fp); fclose($fp);
return $network; return $network;
} }

View file

@ -1,3 +1,3 @@
<?php <?php
define("VERSION", "20161103-5"); define("VERSION", "20161103-6");
?> ?>