init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
This commit is contained in:
parent
256dc98754
commit
df2daf524d
641 changed files with 140617 additions and 12 deletions
10
cron/check_pppd
Executable file
10
cron/check_pppd
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
PID=""
|
||||
PROG="pppd call dsl-provider"
|
||||
PID=`ps ax | grep "$PROG" | grep -v grep | awk '{ print $1 }'`
|
||||
|
||||
if [ -z "$PID" ]; then
|
||||
echo "Starte Internet neu"
|
||||
pppd call dsl-provider
|
||||
fi
|
||||
16
cron/clean-nico-mailbox.sh
Executable file
16
cron/clean-nico-mailbox.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
# Nico Schottelius
|
||||
# clean current mailbox, so imap connections are faster
|
||||
|
||||
set -e
|
||||
|
||||
maildir="/home/server/mail/schottelius.org/nico/"
|
||||
curdir="$maildir/cur"
|
||||
date=$(date +%Y-%m-%d)
|
||||
archiv="/home/user/nico/mail-archiv"
|
||||
ddir="${archiv}/${date}/"
|
||||
|
||||
mkdir -p "$ddir"
|
||||
|
||||
find "$curdir" -type f -exec mv {} "$ddir" \;
|
||||
|
||||
59
cron/lighty-rrd-graph.sh
Executable file
59
cron/lighty-rrd-graph.sh
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/sh
|
||||
|
||||
RRDTOOL=/usr/bin/rrdtool
|
||||
OUTDIR=/home/server/www/nico/org/schottelius/home/www/stats
|
||||
INFILE=/home/server/www/rrd/lighttpd.rrd
|
||||
OUTPRE=lighttpd-traffic
|
||||
|
||||
DISP="-v bytes --title TrafficWebserver \
|
||||
DEF:binraw=$INFILE:InOctets:AVERAGE \
|
||||
DEF:binmaxraw=$INFILE:InOctets:MAX \
|
||||
DEF:binminraw=$INFILE:InOctets:MIN \
|
||||
DEF:bout=$INFILE:OutOctets:AVERAGE \
|
||||
DEF:boutmax=$INFILE:OutOctets:MAX \
|
||||
DEF:boutmin=$INFILE:OutOctets:MIN \
|
||||
CDEF:bin=binraw,-1,* \
|
||||
CDEF:binmax=binmaxraw,-1,* \
|
||||
CDEF:binmin=binminraw,-1,* \
|
||||
CDEF:binminmax=binmax,binmin,- \
|
||||
CDEF:boutminmax=boutmax,boutmin,- \
|
||||
AREA:binmin#ffffff: \
|
||||
STACK:binminmax#f00000: \
|
||||
LINE1:binmin#a0a0a0: \
|
||||
LINE1:binmax#a0a0a0: \
|
||||
LINE2:bin#a0a735:incoming \
|
||||
GPRINT:bin:MIN:%.2lf \
|
||||
GPRINT:bin:AVERAGE:%.2lf \
|
||||
GPRINT:bin:MAX:%.2lf \
|
||||
AREA:boutmin#ffffff: \
|
||||
STACK:boutminmax#00f000: \
|
||||
LINE1:boutmin#a0a0a0: \
|
||||
LINE1:boutmax#a0a0a0: \
|
||||
LINE2:bout#a0a735:outgoing \
|
||||
GPRINT:bout:MIN:%.2lf \
|
||||
GPRINT:bout:AVERAGE:%.2lf \
|
||||
GPRINT:bout:MAX:%.2lf \
|
||||
"
|
||||
|
||||
|
||||
$RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP
|
||||
$RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP
|
||||
$RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP
|
||||
|
||||
OUTPRE=lighttpd-requests
|
||||
|
||||
DISP="-v req --title RequestsperSecond -u 1 \
|
||||
DEF:req=$INFILE:Requests:AVERAGE \
|
||||
DEF:reqmax=$INFILE:Requests:MAX \
|
||||
DEF:reqmin=$INFILE:Requests:MIN \
|
||||
CDEF:reqminmax=reqmax,reqmin,- \
|
||||
AREA:reqmin#ffffff: \
|
||||
STACK:reqminmax#0e0e0e: \
|
||||
LINE1:reqmin#a0a0a0: \
|
||||
LINE1:reqmax#a0a0a0: \
|
||||
LINE2:req#00a735:requests"
|
||||
|
||||
|
||||
$RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP
|
||||
$RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP
|
||||
$RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP
|
||||
12
cron/ping_pong
Executable file
12
cron/ping_pong
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#HOSTS="www.spiegel.de www.lernen.de www.isc.org B.ROOT-SERVERS.NET"
|
||||
HOSTS="www.heise.de www.netcraft.com "
|
||||
|
||||
STATUS=offline
|
||||
|
||||
for myh in $HOSTS; do
|
||||
ping -c1 $myh >/dev/null 2>&1 && STATUS=online
|
||||
done
|
||||
|
||||
if [ "$STATUS" = offline ]; then
|
||||
echo 'Offline.'`date`
|
||||
fi
|
||||
28
cron/webalizer.cron
Executable file
28
cron/webalizer.cron
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
# Date: 27. May 1999
|
||||
# Author: Nico Schottelius ( webmaster@schottelius.org )
|
||||
# webalizer.cron; do webalizer for every server
|
||||
# Last Modified: 20. Mai 2003
|
||||
# Version : 1.02
|
||||
|
||||
# Preperations
|
||||
|
||||
# unset / set varibales
|
||||
SERV=""
|
||||
WEBALIZER="/usr/bin/nice -n 20 webalizer"
|
||||
ERR_LOG="/var/log/webalizer.err"
|
||||
STD_LOG="/var/log/webalizer.log"
|
||||
|
||||
## Startup
|
||||
echo Starting at : `date`
|
||||
|
||||
# MAIN
|
||||
for SERV in `find /home/server/www/ -name webalizer.conf`; do
|
||||
echo "Using $SERV"
|
||||
LOGDIR=`dirname $SERV`/..
|
||||
$WEBALIZER -c $SERV $LOGDIR/access.log*
|
||||
# $WEBALIZER -c $SERV $LOGDIR/access.log.1 $LOGDIR/access.log*
|
||||
done
|
||||
|
||||
## Shutdown
|
||||
echo Stopping at : `date`
|
||||
32
cron/webalizer.cron-v0.2
Normal file
32
cron/webalizer.cron-v0.2
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
# Date: 27. May 1999
|
||||
# Author: Nico Schottelius ( webmaster@schottelius.org )
|
||||
# webalizer.cron; do webalizer for every server
|
||||
# Last Modified: 20. Mai 2003
|
||||
# Version : 1.02
|
||||
|
||||
# Preperations
|
||||
|
||||
# unset / set varibales
|
||||
SERV=""
|
||||
WEBALIZER="/usr/bin/nice -n 20 webalizer -c"
|
||||
ERR_LOG="/var/log/webalizer.err"
|
||||
STD_LOG="/var/log/webalizer.log"
|
||||
|
||||
## Startup
|
||||
echo Starting at : `date`
|
||||
|
||||
# MAIN
|
||||
for SERV in `find /home/server/www/ -name webalizer.conf`; do
|
||||
echo "Using $SERV"
|
||||
LOGDIR=`dirname $SERV`/..
|
||||
for log in $LOGDIR/access.log $LOGDIR/access.log.1; do
|
||||
echo "$log ..."
|
||||
$WEBALIZER $SERV $log
|
||||
cat $log | $WEBALIZER $SERV
|
||||
done
|
||||
zcat $LOGDIR/access*.gz | $WEBALIZER $SERV
|
||||
done
|
||||
|
||||
## Shutdown
|
||||
echo Stopping at : `date`
|
||||
3
cron/webalizer.unix
Executable file
3
cron/webalizer.unix
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd /home/server/www/nico/org/schottelius/unix
|
||||
webalizer -c webalizer/webalizer.conf logs/access.log.1
|
||||
Loading…
Add table
Add a link
Reference in a new issue