3 ftp_server
=reports.op5.com
7 echo "Sending $1 to $ftp_server"
8 lftp
$ftp_server -e "cd upload; put $1; exit"
11 if [ "$1" -a -f "$1" ]; then
16 [ "$1" ] && tarfile
="$1.tar.bz2" || tarfile
=logs-config-$
(date +%s
).
tar.bz2
18 cfg_files
=$
(mktemp
/tmp
/config-files.XXXXXX
)
19 sed -n 's/^cfg_file=//p' /opt
/monitor
/etc
/nagios.cfg
> $cfg_files
20 for d
in $
(grep ^cfg_dir
/opt
/monitor
/etc
/nagios.cfg
); do
21 find $d -type f
-name "*.cfg" >> $cfg_files
23 tar -p -P -c -v -j -f $tarfile \
25 /opt
/monitor
/var
/nagios.log \
26 /opt
/monitor
/var
/archives
/nagios-
*.log