gentoo-sway #2
1 changed files with 76 additions and 67 deletions
13
bin/rsync.sh
13
bin/rsync.sh
|
@ -48,7 +48,6 @@ DEST_USB="/mnt/backup/${HOSTNAME}/dbroqua/"
|
|||
# SSHFS
|
||||
DEST_SSHFS="storage:Backup/${HOSTNAME}/dbroqua/"
|
||||
|
||||
echo `date` > ${ORIG}/lastBackup
|
||||
|
||||
while getopts t:h opt
|
||||
do
|
||||
|
@ -71,7 +70,6 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
|
||||
|
||||
if [ "${TYPE}" != '' ] ; then
|
||||
case ${TYPE} in
|
||||
|
@ -91,3 +89,14 @@ if [ "${TYPE}" != '' ] ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
echo $?
|
||||
|
||||
if [ $? == 0 ] ; then
|
||||
echo `date` > ${ORIG}/lastBackup
|
||||
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
|
||||
rm ${ORIG}/lastFailBackup
|
||||
else
|
||||
echo `date` > ${ORIG}/lastFailBackup
|
||||
echo "Method: ${TYPE}" >> ${ORIG}/lastFailBackup
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue