also check for configuration file as part of verification step

This commit is contained in:
Ray Tanaka
2018-10-31 00:37:11 -07:00
parent 34690ca9d4
commit fd4d161f1a

View File

@@ -2,6 +2,12 @@
function verify_configuration () { function verify_configuration () {
echo "Verifying rlcone configuration..." echo "Verifying rlcone configuration..."
if ! [ -e "/root/.config/rclone/rclone.conf" ]
then
echo "STOP: rclone config was not found. did you configure rclone correctly?"
exit 1
fi
if ! rclone lsd "$RCLONE_DRIVE": | grep -q "$RCLONE_PATH" if ! rclone lsd "$RCLONE_DRIVE": | grep -q "$RCLONE_PATH"
then then
echo "STOP: Could not find the $RCLONE_DRIVE:$RCLONE_PATH" echo "STOP: Could not find the $RCLONE_DRIVE:$RCLONE_PATH"