Skip to content

Instantly share code, notes, and snippets.

@alex-vlasov
Last active January 1, 2016 22:09
Show Gist options
  • Save alex-vlasov/8208302 to your computer and use it in GitHub Desktop.
Save alex-vlasov/8208302 to your computer and use it in GitHub Desktop.
box.net WebDAV backup-manager backup
#!/bin/bash
if [ -n "`mount | grep box.net`" ]
then
echo "box.net mounted, continue" ;
else
echo "box.net not mounted, trying to mount" ;
modprobe fuse
mount -t davfs https://dav.box.com/dav /media/box.net
if [ -z "`mount | grep box.net`" ]
then
echo "impossible to mount, exiting" ;
exit ;
fi
fi
result=`backup-manager 2>&1` ;
echo $result ;
error_test_string="/usr/share/backup-manager/backup-methods.sh: line 49:"
while [[ $result =~ $error_test_string ]]
do
echo "Error during upload, retrying ..." ;
result=`backup-manager 2>&1` ;
echo $result ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment