rename err to bash-bear
[distro-setup] / system-status
index 6b25454468af35da3960ea2ae8ec5756047347ad..47d0a6753e7d6612989043dcbc82ccd664e69627 100755 (executable)
@@ -13,7 +13,7 @@ if [[ $EUID != 1000 ]]; then
   exit 1
 fi
 
-source /a/bin/errhandle/err
+source /a/bin/bash-bear-trap/bash-bear
 status_file=/dev/shm/iank-status
 
 shopt -s nullglob
@@ -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 &