Update pibackup.sh

This commit is contained in:
2022-10-08 16:40:04 -05:00
parent 1e0171c681
commit d4910950c6

View File

@@ -1,6 +1,6 @@
#!/bin/bash
TEST=false;
TEST=true;
if [ "$1" != "update" ]; then
@@ -23,11 +23,18 @@ 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}
sleep 15s
#mount.cifs ${ServerName} ${MountPoint} -o user=${UserName},password=${Password}
until [ $c > 59 ]; do
if [ ! -f ${MountPoint}/mounted ]; then
echo "$(date) - Backup Drive mounted"
c=100
else
c=`expr $c + 1`
sleep 1s
fi
done
if [ $c != 100 ]; then
echo "$(date) - Backup Drive COULD NOT be mounted... exiting"
exit 1
fi