diff --git a/pibackup.sh b/pibackup.sh index 23a8320..fd4dd4a 100755 --- a/pibackup.sh +++ b/pibackup.sh @@ -23,8 +23,12 @@ if [ "$1" != "update" ]; then echo "$(date) - Checking for mounted Backup Drive..." if [ ! -f ${MountPoint}/mounted ]; then echo "$(date) - Not found, mounting drive now..." - #mount.cifs ${ServerName} ${MountPoint} -o user=${UserName},password=${Password} - mount -a + + if [ "${ServerName}" != "" ]; then + mount.cifs ${ServerName} ${MountPoint} -o user=${UserName},password=${Password} + else + mount -a + foi c=0 until [ $c -gt 179 ]; do if [ -f ${MountPoint}/mounted ]; then