Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Exemple pour un fichier "checkrobots.sh" qui doit vérifier si /home/public_html/robots.txt a changé durant la dernière heure
- #!/bin/bash
- [[ -z `find /home/public_html/robots.txt -mmin -60` ]]
- if [ $? -eq 0 ]
- then
- echo -e "aucun changement"
- else
- mail -s "Le fichier a été changé" email@example.com
- fi
- puis ensuite tu mets dans le CRON, avec par exemple un check toutes les heures :
- 01 * * * * /path/to/checkrobots.sh
Advertisement
Add Comment
Please, Sign In to add comment