47 lines
1.3 KiB
Bash
Executable File
47 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# openmamba daily sync script
|
|
# (c) 2006-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
#
|
|
. /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
|
|
|
|
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
|
|
|
|
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
|