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
|
||||
config/config.php
|
||||
config/config.php
|
||||
config/DMRNetwork.txt
|
|
@ -39,14 +39,14 @@ function getFirmwareVersion() {
|
|||
}
|
||||
|
||||
function setDMRNetwork($network) {
|
||||
$fp = fopen('/tmp/DMRNetwork.txt', 'w');
|
||||
$fp = fopen('../config/DMRNetwork.txt', 'w');
|
||||
fwrite($fp, $network);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
function getDMRNetwork() {
|
||||
$fp = fopen('/tmp/DMRNetwork.txt', 'r');
|
||||
$network = fread($fp, filesize("/tmp/DMRNetwork.txt"));
|
||||
$fp = fopen('config/DMRNetwork.txt', 'r');
|
||||
$network = fread($fp, filesize("config/DMRNetwork.txt"));
|
||||
fclose($fp);
|
||||
return $network;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
define("VERSION", "20161103-5");
|
||||
define("VERSION", "20161103-6");
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue