View Single Post
Old 08-19-2020, 04:41 PM   #267
elpistola
Junior Member
elpistola began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2020
Device: Kobo Libra h20
Quote:
Originally Posted by geek1011 View Post
To add on to this, you can use NM to add a button to toggle FTP on/off. It's easy enough to modify this to also rescan books when it's turned off.

Something like this:

Code:
menu_item:main:FTP:cmd_output:500:quiet:/bin/busybox pkill -f "^/bin/busybox tcpsvd -E 0.0.0.0 1021"
  chain_success:skip:4
    chain_failure:cmd_spawn:quiet:exec /bin/busybox tcpsvd -E 0.0.0.0 1021 /bin/busybox ftpd -w -t 30 /mnt/onboard
    chain_success:dbg_toast:Started FTP server for KOBOeReader on port 1021
    chain_failure:dbg_toast:Error starting FTP server for KOBOeReader on port 1021
    chain_always:skip:-1
  chain_success:dbg_toast:Stopped FTP server for KOBOeReader on port 1021
  chain_success:nickel_misc:rescan_books
You can also use the `nickel_setting` and `nickel_wifi` actions to force enable wifi while FTP is enabled.
Oh that's cool, will attempt it this weekend. Will save a few steps. Thank you
elpistola is offline   Reply With Quote