Skip to content

Instantly share code, notes, and snippets.

@bartowl
bartowl / fetch-elicznik.sh
Created February 22, 2021 14:18
eLicznik Taurona - skrypt ładujący dane z licznika do InfluxDB, wspiera więcej miejsc poboru energii
#!/bin/bash
data=${1:-$(date +%d.%m.%Y --date yesterday)}
# run with date on format dd.mm.yyyy as argument, without arguments takes yesterday
# skip run if already done, to be started multiple times per day due to elicznik api instability
[ $(ls -l /tmp/fetch_elicznik*"$data" 2>/dev/null | wc -l) -eq 2 ] && exit
login="xxxxx"
password="xxxxx"
@bartowl
bartowl / nut-plugin-client
Created February 18, 2021 14:48 — forked from zefanja/nut-plugin-client
Check_MK integration for NUT (check plugin for Server and Client)
#!/bin/sh
if which upsc > /dev/null 2>&1 ; then
echo '<<<nut>>>'
for ups in $(upsc -l)
do
upsc $ups| sed "s,^,$ups ,"
done
fi