2012-03-12 15:18:41 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# openmamba daily sync script
|
2012-03-12 15:36:36 +01:00
|
|
|
# (c) 2006-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
2012-03-12 15:18:41 +01:00
|
|
|
#
|
|
|
|
. /etc/sysconfig/openmamba-central
|
|
|
|
RSYNC_OPT="-av --no-o --delete --delete-after"
|
|
|
|
|
|
|
|
if [ "$ftpsync" ]; then
|
|
|
|
echo "Syncing openmamba devel utils dir"
|
|
|
|
ftpsync -q -p $local_ftp/devel/utils \
|
|
|
|
$dest_ftp/pub/openmamba/devel/utils ftpuser=$ftpuser ftppasswd=$ftppass
|
|
|
|
fi
|
|
|
|
|
2012-03-12 15:36:36 +01:00
|
|
|
echo "Syncing openmamba allmedias files"
|
|
|
|
if [ "$ftpsync" ]; then
|
|
|
|
ftpsync -q -p $local_ftp/allmedias* \
|
|
|
|
$dest_ftp/pub/openmamba/ ftpuser=$ftpuser ftppasswd=$ftppass
|
|
|
|
else
|
|
|
|
rsync \
|
|
|
|
$RSYNC_OPT \
|
|
|
|
$local_ftp/allmedias* $dest_rsync \
|
|
|
|
--password-file=/etc/rsync.password --bwlimit=400
|
|
|
|
fi
|
|
|
|
|
2012-03-12 15:18:41 +01:00
|
|
|
echo "Syncing openmamba db dir"
|
|
|
|
if [ "$ftpsync" ]; then
|
|
|
|
ftpsync -q -p $local_ftp/db \
|
|
|
|
$dest_ftp/pub/openmamba/db ftpuser=$ftpuser ftppasswd=$ftppass
|
|
|
|
else
|
|
|
|
rsync \
|
|
|
|
$RSYNC_OPT \
|
|
|
|
$local_ftp/db $dest_rsync \
|
|
|
|
--password-file=/etc/rsync.password --bwlimit=400
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Syncing openmamba lists"
|
|
|
|
if [ "$ftpsync" ]; then
|
|
|
|
ftpsync -q -p $local_ftp/lists \
|
|
|
|
$dest_ftp/pub/openmamba/lists ftpuser=$ftpuser ftppasswd=$ftppass
|
|
|
|
else
|
|
|
|
rsync \
|
|
|
|
$RSYNC_OPT \
|
|
|
|
$local_ftp/lists $dest_rsync \
|
|
|
|
--password-file=/etc/rsync.password --bwlimit=400
|
|
|
|
fi
|