websec-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advanced WebSec timings with cron


From: Baruch Even
Subject: Re: Advanced WebSec timings with cron
Date: Sat, 04 Dec 2004 01:27:08 +0000
User-agent: Mozilla Thunderbird 0.8 (X11/20040926)

Baruch Even wrote:
You can see what a user did with cron and websec to control the times he checks websites at: http://www.mummila.net/varasto/tekstit/websec-cron.html

With the permission of the author I'm posting the actual text to the mailing list to archive it.


address@hidden:~$ crontab -l
59              11      *       *       *       /home/jani/bin/websec.daily
59 23,11 * * * /home/jani/bin/websec.semidaily
59              *       *       *       *       /home/jani/bin/websec.hourly
59,29 * * * * /home/jani/bin/websec.semihourly 14,29,44,59 * * * * /home/jani/bin/websec.quarterly
address@hidden:~$ ls -l bin/websec*
-rwxr--r--  1 jani jani 447 Sep  3 13:30 bin/websec
lrwxrwxrwx  1 jani jani   6 Sep  3 13:20 bin/websec.daily -> websec
lrwxrwxrwx  1 jani jani   6 Sep  3 13:20 bin/websec.hourly -> websec
lrwxrwxrwx  1 jani jani   6 Sep  3 13:20 bin/websec.quarterly -> websec
lrwxrwxrwx  1 jani jani   6 Sep  3 13:20 bin/websec.semidaily -> websec
lrwxrwxrwx  1 jani jani   6 Sep  3 13:20 bin/websec.semihourly -> websec
address@hidden:~$ cat bin/websec
#!/bin/sh
WSBASE=~/.websec
WS=websec
WSELF=`basename $0`
WSARGS=
WSLOG="/tmp/wsec_jani.log"



if [ "$WSLOG" == "" ] ; then
  if [ -d "$WSBASE/${WSELF:7}" ] ; then
    $WS --base "$WSBASE/${WSELF:7}" $WSARGS
  else
    echo $WS --base \"$WSBASE/${WSELF:7}\" $WSARGS
  fi

else
  if [ -d "$WSBASE/${WSELF:7}" ] ; then
    $WS --base "$WSBASE/${WSELF:7}" $WSARGS > $WSLOG
  else
    echo $WS --base \"$WSBASE/${WSELF:7}\" $WSARGS > $WSLOG
  fi

fi
address@hidden:~$ ls .websec/ -l
total 9
drwxr-x---  2 jani jani  656 Sep  3 13:14 archive
drwxr-xr-x  3 jani jani  128 Sep  3 13:31 daily
drwxr-xr-x  3 jani jani   96 Sep  3 13:59 hourly
-rw-r--r--  1 jani jani  115 Aug 25 23:45 ignore.list
drwxr-xr-x  3 jani jani   96 Sep  3 14:14 quarterly
drwxr-xr-x  3 jani jani   96 Sep  3 13:20 semidaily
drwxr-xr-x  3 jani jani   96 Sep  3 13:59 semihourly
-rw-r--r--  1 jani jani 1278 Sep  3 12:29 url.list
address@hidden:~$ ls .websec/daily/ -l
total 8
drwxr-x---  2 jani jani 176 Sep  3 13:31 archive
-rw-r--r--  1 jani jani 115 Sep  3 12:39 ignore.list
-rw-r--r--  1 jani jani 382 Sep  3 12:31 url.list




reply via email to

[Prev in Thread] Current Thread [Next in Thread]