« Back to parent site (Nuudelisoppa)

Advanced WebSec timings with cron

This is striving to be self-explanatory.

jani@sidx:~$ 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 jani@sidx:~$ 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 jani@sidx:~$ 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 jani@sidx:~$ 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 jani@sidx:~$ 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

^
Return to top