From 69230f108272caea94995b206c88af961a0a811f Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 10 Apr 2023 18:50:55 -0500 Subject: [PATCH] Update pibackup.sh --- pibackup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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