View Single Post
Old 07-28-2022, 06:08 PM   #56
ajkessel
Connoisseur
ajkessel began at the beginning.
 
Posts: 58
Karma: 10
Join Date: Jul 2017
Device: Kindle Paperwhite 3rd Generation
Quote:
Originally Posted by sherman View Post
When you use cmd_spawn in NickelMenu, it runs the script in a separate process, then carries on. If you try and use cmd_output, NickelMenu & NickelDBus will conflict with each other.

If you want to do stuff after the content import, you should do it in the shell script if possible. If there is something that you are trying to do in NickelMenu that can't be done in NickelDBus, let me know, and I might be able to add it.
Thanks! I am actually trying to do it all in the shell script. Here is the full context:
Code:
#!/bin/sh
qndb -t 60000 -s pfmDoneProcessing -m pfmRescanBooksFull
echo usb plug add >>/tmp/nickel-hardware-status
sleep 10
echo usb plug remove >>/tmp/nickel-hardware-status
The goal is to trigger KoboCloud to sync with the cloud, and then to trigger a USB connect/disconnect in order to get AutoShelf to organize the newly downloaded items into collections. When I run the first command from telnet, it waits until it's done. When I run it from the shell script triggered by cmd_spawn, it seems to skip instantly to the next step without waiting for the rescan to complete.

Am I doing it wrong?
ajkessel is offline   Reply With Quote