New backup 2025-10-09 13:15:01
This commit is contained in:
parent
a93f1cc73f
commit
b2a9b66991
1 changed files with 13 additions and 0 deletions
13
de/home/.config/eww/scripts/home/mcstatus
Normal file
13
de/home/.config/eww/scripts/home/mcstatus
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
mcstatus_cache="${HOME}/.cache/mcstatus.json"
|
||||
|
||||
if [[ ! $(find "${mcstatus_cache}" -cmin -15 -print 2>/dev/null) ]]; then
|
||||
if ! ping -w 15 -c 1 wttr.in;then
|
||||
exit
|
||||
fi
|
||||
wttr_json=$(curl --silent wttr.in/Eugene?format=j1)
|
||||
if [ "" != "${wttr_json}" ]; then
|
||||
echo "${wttr_json}" | tee "${wttr_cache}"
|
||||
fi
|
||||
fi
|
Loading…
Add table
Reference in a new issue