diff --git a/pibackup.sh b/pibackup.sh index c999602..417bf74 100755 --- a/pibackup.sh +++ b/pibackup.sh @@ -4,7 +4,6 @@ source /opt/idssys/defaults/colors.inc source /opt/idssys/defaults/default.inc source /opt/idssys/pibackup/settings.inc -MountPoint="/mnt/veeam-backups" BackupDir="${MountPoint}/${hostname}" logfile=/opt/idssys/pibackup/logfile diff --git a/run.sh b/run.sh index f91f98d..07d1c50 100755 --- a/run.sh +++ b/run.sh @@ -5,11 +5,6 @@ source /opt/idssys/defaults/default.inc source /opt/idssys/pibackup/settings.inc if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]]; then - # if [ "${1}" = "gui" ]; then - # DISP_HEADER - # fi - - # if [ "${1}" != "guiX" ]; then if curl -s --head --request GET https://git.schroedercity.com | grep "HTTP/2 200" > /dev/null; then if [ "${2}" != "q" ]; then echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}" @@ -54,6 +49,14 @@ if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]]; then fi fi -/opt/idssys/pibackup/pibackup.sh ${1} ${2} - +if [ ! -f ${MountPoint}/mounted ]; then + mount.cifs ${ServerName} ${MountPoint} -o user=${UserName},password=${Password} + sleep 10 +fi +if [ -f ${MountPoint}/mounted ]; then + /opt/idssys/pibackup/pibackup.sh ${1} ${2} +else + echo "Backup folder is not mounted (${MountPoint})" + exit 1 +fi exit 0