mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-31 05:00:41 +00:00
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2552 e7d03fd6-7b0d-0410-9947-9c21f3af8025
14 lines
545 B
Bash
Executable file
14 lines
545 B
Bash
Executable file
#!/bin/sh
|
|
# this script is intended to be run daily from cron
|
|
# GNU GPL Copyright (C) 2004-2005 Bastian Kleineidam
|
|
|
|
# Put here your url(s) you want to check, separated by whitespace.
|
|
# Urls can also be local files, eg "/var/www/index.html".
|
|
URL="http://www.imadoofus.org/"
|
|
|
|
PATH="/bin:/usr/bin"
|
|
LOGFILE="$HOME/.linkchecker/blacklist"
|
|
|
|
linkchecker -Fblacklist $URL
|
|
# this awk script complains if urls fail for at least two script runs
|
|
[ -r $LOGFILE ] && awk '/^[[:digit:]]+/ {if ($1 > 1) printf "URL %s failed for %d days.", $2, $1; }' $LOGFILE
|