iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename err to bash-bear
[distro-setup]
/
system-status
diff --git
a/system-status
b/system-status
index 6b25454468af35da3960ea2ae8ec5756047347ad..47d0a6753e7d6612989043dcbc82ccd664e69627 100755
(executable)
--- a/
system-status
+++ b/
system-status
@@
-13,7
+13,7
@@
if [[ $EUID != 1000 ]]; then
exit 1
fi
exit 1
fi
-source /a/bin/
errhandle/er
r
+source /a/bin/
bash-bear-trap/bash-bea
r
status_file=/dev/shm/iank-status
shopt -s nullglob
status_file=/dev/shm/iank-status
shopt -s nullglob
@@
-454,7
+454,11
@@
main-loop() {
if $power; then
if (( loop_count % 10 == 0 )); then
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 &
case $bat in
100|9?)
bitcoinon &