forked from ungleich-public/ccollect
add luckys patches
idea looks good, patches need some claenups Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
ed30a4d25b
commit
c9472c5dff
5 changed files with 41 additions and 1 deletions
|
@ -1 +1 @@
|
|||
home.schottelius.org
|
||||
localhost
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
31c31,41
|
||||
< logdir="${LOGCONF}/destination"
|
||||
---
|
||||
> c_dest="${LOGCONF}/destination"
|
||||
>
|
||||
> if [ ! -f ${c_dest} ]; then
|
||||
> _exit_err "Destination ${c_dest} is not a file. Skipping."
|
||||
> else
|
||||
> logdir=$(cat "${c_dest}"); ret="$?"
|
||||
> if [ "${ret}" -ne 0 ]; then
|
||||
> _exit_err "Destination ${c_dest} is not readable. Skipping."
|
||||
> fi
|
||||
> fi
|
||||
>
|
26
contrib/lucky-2009-07-22/ccollect_stats.sh
Normal file
26
contrib/lucky-2009-07-22/ccollect_stats.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/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
|
Loading…
Reference in a new issue