Yesterday, 08:18 AM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara HD
|
Running script from NickelMenu returns too early
I have NickelMenu 0.5.4 on a Kobo Clara HD with firmware 4.38.23038.
I have the following in my NickelMenu config: Code:
menu_item :main :Dropbox Pull :nickel_wifi :enable chain_success :nickel_wifi :autoconnect_silent chain_success :cmd_spawn :quiet :/mnt/onboard/.adds/rclone/sync.sh chain_success :nickel_misc :rescan_books_full chain_failure :dbg_toast :Failure! Code:
#!/bin/sh # Constants readonly rclone_dir="/mnt/onboard/.adds/rclone" readonly rclone_remote="Dropbox:" readonly book_library="/mnt/onboard/Books" # Start sync qndb -m mwcToast 1000 'Starting Dropbox download...' if ! "$rclone_dir/rclone" \ --ca-cert "$rclone_dir/cacert.pem" \ --log-file "$rclone_dir/rclone.log" \ --ignore-checksum --size-only \ --verbose \ copy "$rclone_remote" "$book_library" then qndb -m mwcToast 8000 "Error in download!" exit 1 fi qndb -m pfmRescanBooksFull I also tried cmd_output but that just seemed to wait the full timeout and then error, before even trying to run the script (this is apparent from reading the log while it's happening) Finally, I also tried not using a script and running rclone directly in the cmd_spawn, but that also exited too soon. Again, sync.sh does run and complete as expected, it is only in the context of NickelMenu that it's going to the next action before it should. |
Today, 06:34 AM | #2 |
Connoisseur
Posts: 60
Karma: 143000
Join Date: Apr 2022
Device: Kobo Libra 2
|
As you spawn a command, it will immediately return and execute the rescan. So you'd need to do everything inside the script and use qndb.
Also, see here for a working rclone setup: https://www.mobileread.com/forums/sh...9&postcount=11 |
Advert | |
|
Today, 09:25 AM | #3 | ||
Junior Member
Posts: 2
Karma: 10
Join Date: Jul 2024
Device: Kobo Clara HD
|
Quote:
Quote:
Code:
retries=60 while [ "$retries" -gt 0 ] do ping -c 1 -w 3 '1.1.1.1' && break sleep 1 retries="$((retries - 1))" done |
||
Tags |
kobo, nickelmenu, rclone |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
NickelMenu script for fixing Pocket images | qkqw | Kobo Developer's Corner | 49 | 06-24-2024 03:45 PM |
Battery Statistics Calculator script (NickelMenu) not working in Libra Colour | shyhermit | Kobo Reader | 11 | 05-24-2024 06:12 PM |
Running calibredb from a cron script | rolgiati | Server | 13 | 03-05-2019 04:43 PM |
Error when running Igor's script | gloorfindel | Amazon Kindle | 3 | 11-07-2010 03:14 PM |
Running a script on-demand? | pepak | Sony Reader Dev Corner | 1 | 04-27-2009 11:22 AM |