>>108507177
for site_file in "$CONF_DIR"/*; do
[ -f "$site_file" ] || continue
last_update=$(stat -c %Y -- "$site_file")
site_url=$(< "$site_file")
current_update=$(curl --silent --head -- "$site_url" \
| sed -n '/^last-modified: / s/^last-modified: // p' \
| date -f - +%s)
if [ "$last_update" -lt "$current_update" ]; then
touch -- "$site_file"
sendmail -t <<-HERE
To: anonymous@4chan.org
Subject: ${site_file##*/} updated
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8
Comment too long. Click here to view the full text.