diff --git a/.gitignore b/.gitignore index c6e887e..65f4c09 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ Links.txt +config/config.php \ No newline at end of file diff --git a/README.md b/README.md index 782d729..a1f6dd6 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ Installation ============ * Please ensure to not put loglevels at 0 in MMDVM.ini. * Copy all files into your webroot and enjoy working with it. -* Edit config.php located in /config-folder in your web-folder. +* Create a config/config.php by calling setup.php and giving suitable values +* If Dashboard is working, remove setup.php from your webroot For detailled installation see `linux-step-by-step.md` within this repository. diff --git a/config/config.php b/config/config.php deleted file mode 100644 index 5ff516b..0000000 --- a/config/config.php +++ /dev/null @@ -1,92 +0,0 @@ - \ No newline at end of file diff --git a/include/functions.php b/include/functions.php index 6d860e4..03e0e6d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2,7 +2,7 @@ function getMMDVMHostVersion() { // returns creation-time of MMDVMHost as version-number - $filename = MMDVMHOSTPATH . "MMDVMHost"; + $filename = MMDVMHOSTPATH."/MMDVMHost"; exec($filename." -v 2>&1", $output); if (!startsWith(substr($output[0],18,8),"20")) { return getMMDVMHostFileVersion(); @@ -13,7 +13,7 @@ function getMMDVMHostVersion() { function getMMDVMHostFileVersion() { // returns creation-time of MMDVMHost as version-number - $filename = MMDVMHOSTPATH . "MMDVMHost"; + $filename = MMDVMHOSTPATH."/MMDVMHost"; if (file_exists($filename)) { return date("d M y", filectime($filename)); } @@ -85,7 +85,7 @@ function showMode($mode, $mmdvmconfigs) { function getLog() { // Open Logfile and copy loglines into LogLines-Array() $logLines = array(); - if ($log = fopen(MMDVMLOGFILE,'r')) { + if ($log = fopen(MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log", 'r')) { while ($logLine = fgets($log)) { if (!strpos($logLine, "Debug") && !strpos($logLine,"Received a NAK")) { array_push($logLines, $logLine); diff --git a/include/sysinfo.php b/include/sysinfo.php index 33bbafa..0d8d75a 100644 --- a/include/sysinfo.php +++ b/include/sysinfo.php @@ -2,7 +2,7 @@ exec("cat /sys/class/thermal/thermal_zone0/temp", $cputemp); exec("cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", $cpufreq); $cputemp = $cputemp[0] / 1000; - if (TEMPERATUREALERT && $cputemp > TEMPERATUREHIGHLEVEL) { + if (defined("TEMPERATUREALERT") && $cputemp > TEMPERATUREHIGHLEVEL) { ?> + + + + + + +