mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-07-09 15:04:01 +02:00
fix check whether setting is present
This commit is contained in:
@ -69,7 +69,7 @@ do
|
|||||||
echo "*** RECHECK UNDERVOLTAGE ***"
|
echo "*** RECHECK UNDERVOLTAGE ***"
|
||||||
countReports=$(sudo cat /var/log/syslog | grep -c "Under-voltage detected!")
|
countReports=$(sudo cat /var/log/syslog | grep -c "Under-voltage detected!")
|
||||||
echo "${countReports} undervoltage reports found in syslog"
|
echo "${countReports} undervoltage reports found in syslog"
|
||||||
if [ ${#undervoltageReports} -eq 0 ]; then
|
if ! grep -Eq "^undervoltageReports=" ${infoFile}; then
|
||||||
# write new value to info file
|
# write new value to info file
|
||||||
undervoltageReports="${countReports}"
|
undervoltageReports="${countReports}"
|
||||||
echo "undervoltageReports=${undervoltageReports}" >> ${infoFile}
|
echo "undervoltageReports=${undervoltageReports}" >> ${infoFile}
|
||||||
|
Reference in New Issue
Block a user