fixes
authorIan Kelling <ian@iankelling.org>
Mon, 11 Dec 2023 11:47:05 +0000 (06:47 -0500)
committerIan Kelling <ian@iankelling.org>
Mon, 11 Dec 2023 11:47:05 +0000 (06:47 -0500)
brc2
system-status

diff --git a/brc2 b/brc2
index 195f3dd36d94fc90d6e862f5487c130307b2ba96..3f62206fe633c812068b552d83d6d6d1e67120c5 100644 (file)
--- a/brc2
+++ b/brc2
@@ -366,6 +366,17 @@ anki() {
   schroot -c buster -- anki
 }
 
+daycat() {
+  ngset
+  hrcat /m/md/daylert/{cur,new}/*
+  ngreset
+}
+dayclear() {
+  ngset
+  rm -f /m/md/daylert/{cur,new}/*
+}
+
+
 acat() {
   ngset
   hrcat /m/md/alerts/{cur,new}/*
index 6b25454468af35da3960ea2ae8ec5756047347ad..7f3edf2411c08872f0a69febfb2b119ab61ff402 100755 (executable)
@@ -454,7 +454,11 @@ main-loop() {
 
     if $power; then
       if (( loop_count  % 10 == 0 )); then
-        bat=$(cat /sys/class/power_supply/BAT0/capacity)
+        if [[ -r /sys/class/power_supply/BAT0/capacity ]]; then
+          bat=$(cat /sys/class/power_supply/BAT0/capacity)
+        else
+          bat=100
+        fi
         case $bat in
           100|9?)
           bitcoinon &