Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Add this script to your crontab (crontab -e)
# */15 * * * * /path/to/check_adsense.sh
# don't forget to chmod 744
result=$(cat /var/log/nginx/access.log | grep Mediapartners-Google)
if [ -n "$result" ]; then
python send.py
fi