make DMRNetwork-Information persistent over reboot of system
This commit is contained in:
parent
5cde533d5a
commit
339fabc749
3 changed files with 6 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
Links.txt
|
Links.txt
|
||||||
config/config.php
|
config/config.php
|
||||||
|
config/DMRNetwork.txt
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
define("VERSION", "20161103-5");
|
define("VERSION", "20161103-6");
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue