Last active
November 17, 2021 07:24
-
-
Save energee/acc737c531a3660e3cf9e0905482701a to your computer and use it in GitHub Desktop.
Checks a page for new content, and if it has changed refreshes chromium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
site="https://menu.lolev.beer" | |
previous=`cat checksum` | |
current=`curl -s $site | md5sum` | |
echo "$current" > checksum | |
echo "Previous contents of page: $previous" | |
echo "Current contents of page: $current" | |
if [ "$previous" != "$current" ] | |
then | |
`DISPLAY=:0.0 xdotool key ctrl+R` | |
echo "Page refreshing" | |
else | |
echo "Content matches, skipping refresh" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment