fixes
[distro-setup] / system-status
index 6b25454468af35da3960ea2ae8ec5756047347ad..0e63964a78c519d1e5c1f0462fed7848ecc9d290 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,9 +454,14 @@ 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 &
           ;;
         esac