Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Commit 3c143ab

Browse files
authored
Ensuring the script won't run for gdirve when rclone is not configured
1 parent fa28fae commit 3c143ab

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

backmeup.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,15 @@ then
314314
echo '| You must configure the rclone first!'
315315
echo '| Please run rclone config as the user which will run this script and follow the instructions.'
316316
echo '| After that, re-run this script again'
317+
else
318+
# https://rclone.org/drive/
319+
echo '| Creating the directory and uploading to Google Drive...'
320+
rclone mkdir "$RCLONE_REMOTE$BACKUPFOLDER"
321+
rclone copy "$BASEFOLDER/$FILENAME" "$RCLONE_REMOTE$BACKUPFOLDER/$FILENAME"
322+
echo '|'
323+
echo '| Done!'
324+
echo '|'
317325
fi
318-
# https://rclone.org/drive/
319-
echo '| Creating the directory and uploading to Google Drive...'
320-
rclone mkdir "$RCLONE_REMOTE$BACKUPFOLDER"
321-
rclone copy "$BASEFOLDER/$FILENAME" "$RCLONE_REMOTE$BACKUPFOLDER/$FILENAME"
322-
echo '|'
323-
echo '| Done!'
324-
echo '|'
325326
fi
326327

327328
echo '| Cleaning up...'

0 commit comments

Comments
 (0)