git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ce1484
)
bin/psu: +check Starlink
author
Jan Kratochvil
<jan@jankratochvil.net>
Sat, 2 Dec 2023 11:35:07 +0000
(19:35 +0800)
committer
Jan Kratochvil
<jan@jankratochvil.net>
Sat, 2 Dec 2023 11:35:07 +0000
(19:35 +0800)
bin/psu
patch
|
blob
|
history
diff --git
a/bin/psu
b/bin/psu
index
f5dc004
..
51cdf90
100755
(executable)
--- a/
bin/psu
+++ b/
bin/psu
@@
-1,2
+1,4
@@
#! /bin/bash
-acpi|&grep -Eq 'Battery 0: Not charging|Battery 0: Charging|No support for device type: power_supply'
+acpi|&grep -Eq 'Battery 0: Not charging|Battery 0: Charging|No support for device type: power_supply' || exit 1
+grpcurl -v -plaintext -d '{"get_status":{}}' 192.168.1.1:9000 SpaceX.API.Device.Device/Handle &>/dev/null || exit 1
+exit 0