scripts
scripts copied to clipboard
rclone-mount-check.sh
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
change it to
if [ "$c" -ge 4 ] ; then break ; fi
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..
A little mistake :
CHECKFILEPATH="mountcheck"
CHECKFILE="mountcheck"
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