added showing date and time; added conveniences
parent
4ff784d4b4
commit
6058a6dea6
|
@ -8,11 +8,11 @@ date_now=$(date +'%b %d, %Y at %H:%M')
|
|||
if [[ $(cat state.txt) = "ON" ]]
|
||||
then
|
||||
echo "OFF" > state.txt
|
||||
cat off.html | sed "s/date-n-time-placeholder/$date_now" > /usr/local/apache2/htdocs/index.html
|
||||
cat off.html | sed "s/date-n-time-placeholder/$date_now/" > /usr/local/apache2/htdocs/index.html
|
||||
./telegram "✅ The generator is OFF!"
|
||||
else
|
||||
echo "ON" > state.txt
|
||||
cat on.html | sed "s/date-n-time-placeholder/$date_now" > /usr/local/apache2/htdocs/index.html
|
||||
cat on.html | sed "s/date-n-time-placeholder/$date_now/" > /usr/local/apache2/htdocs/index.html
|
||||
./telegram "❌ The generator is on. :("
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue