scripts icon indicating copy to clipboard operation
scripts copied to clipboard

rclone-mount-check.sh

Open Antexa opened this issue 7 years ago • 4 comments

I got this issue when i try to run the new script for rclone mount.

Any idea ?

./rclone-mount-check.sh: line 51: [: : integer expression expected

        echo "($wi) Waiting for mount $mount"
        c=$(($c + 1))
        if [ "$wi" -ge 4 ] ; then break ; fi
        sleep 1

Antexa avatar May 09 '17 09:05 Antexa

change it to if [ "$c" -ge 4 ] ; then break ; fi

ajkis avatar May 09 '17 10:05 ajkis

Thanks,

When I start the sh with cron I got the following message:

9.05.2017 14:35:03 CRITICAL: Remount failed.
09.05.2017 14:36:01 ERROR: /mnt/ACD_Enc not mounted, remount in progress.
09.05.2017 14:36:03 CRITICAL: Remount failed.
09.05.2017 14:37:01 ERROR: /mnt/ACD_Enc not mounted, remount in progress.
09.05.2017 14:37:03 CRITICAL: Remount failed.
09.05.2017 14:37:41 INFO: Check successful, /mnt/ACD_Enc mounted.
09.05.2017 14:38:01 ERROR: /mnt/ACD_Enc not mounted, remount in progress.
09.05.2017 14:38:03 CRITICAL: Remount failed.
09.05.2017 14:38:10 INFO: Check successful, /mnt/ACD_Enc mounted.
09.05.2017 14:38:13 INFO: Check successful, /mnt/ACD_Enc mounted.
09.05.2017 14:39:01 ERROR: /mnt/ACD_Enc not mounted, remount in progress.
09.05.2017 14:39:04 CRITICAL: Remount failed.
09.05.2017 14:40:01 ERROR: /mnt/ACD_Enc not mounted, remount in progress.
09.05.2017 14:40:03 CRITICAL: Remount failed.
09.05.2017 14:41:01 ERROR: /mnt/ACD_Enc not mounted, remount in progress.
09.05.2017 14:41:03 CRITICAL: Remount failed.
09.05.2017 14:42:01 ERROR: /mnt/ACD_Enc not mounted, remount in progress.
09.05.2017 14:42:03 CRITICAL: Remount failed.

Any idea ? when i start with

sudo bash -x scripts/rclone-mount-check.sh

It works like a charm..

Antexa avatar May 09 '17 12:05 Antexa

A little mistake :

CHECKFILEPATH="mountcheck"
CHECKFILE="mountcheck"

Antexa avatar May 09 '17 12:05 Antexa

It works with bash instead of sh, maybe add this information can be helpfull

# * * * * * /home/plex/scripts/rclone-mount-check.sh >/dev/null 2>&1

# * * * * * bash /home/plex/scripts/rclone-mount-check.sh >/dev/null 2>&1

Antexa avatar May 09 '17 12:05 Antexa