ccollect/contrib/lucky-2009-07-22/ccollect_stats.sh
Nico Schottelius c9472c5dff add luckys patches
idea looks good, patches need some claenups

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-07-23 18:55:25 +02:00

26 lines
632 B
Bash

#!/bin/sh
#
# 2007 Daniel Aubry
# 2008 Nico Schottelius (added minimal header)
#
# Copying license: GPL2-only
#
# TODO:
# add variables, add copying, add configuration
if [ ! -e /tmp/ccollect-stats.lock ]
then
touch /tmp/ccollect-stats.lock
# changes after license clearify
# for dest in /etc/ccollect/sources/ -type f -name destination | while read line
find /etc/ccollect/sources/*/destination | while read line
do
d=$(basename $(cat $line))
echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log
du -sh $line/* | tee -a /var/log/backup.log
done
rm /tmp/ccollect-stats.lock
fi