added logging of light cuts

master
Adriel Sand 2021-09-30 11:00:11 +03:00
parent a59b0c22d9
commit 0d83a384f7
1 changed files with 2 additions and 0 deletions

View File

@ -10,10 +10,12 @@ then
echo "OFF" > state.txt
cat off.html | sed "s/date-n-time-placeholder/$date_now/" > /usr/local/apache2/htdocs/index.html
./telegram "✅ The generator is OFF!"
echo "OFF,$(date +'%Y/%m/%d %H:%M')" >> light_cuts.csv
else
echo "ON" > state.txt
cat on.html | sed "s/date-n-time-placeholder/$date_now/" > /usr/local/apache2/htdocs/index.html
./telegram "❌ The generator is on. :("
echo "ON,$(date +'%Y/%m/%d %H:%M')" >> light_cuts.csv
fi
echo '<html><body>DONE</body></html>'