View Single Post
Old 09-01-2023, 11:44 AM   #1071
xyclonei
Zealot
xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.xyclonei put the bomp in the bomp-a-bomp-a-bomp.
 
xyclonei's Avatar
 
Posts: 119
Karma: 67444
Join Date: Dec 2018
Device: Kobo Clara HD
Quote:
Originally Posted by Dragen View Post
Could you point me in the right direction, because searching for "ftp" in the thread gives posts about the built-in server.
This is the config I have:

Code:
menu_item:main:Toggle FTP:cmd_output:500:quiet:/bin/busybox pkill -f "^/bin/busybox tcpsvd -E 0.0.0.0 1021"
  chain_success:skip:7
  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 (Port 1021)
		chain_always:nickel_wifi:enable
		chain_success:nickel_wifi:autoconnect
		chain_success:nickel_setting:enable:force_wifi
	chain_failure:dbg_toast:Error Starting FTP Server (Port 1021)
	chain_always:skip:-1
  chain_success:dbg_toast:Stopped FTP Server (Port 1021)
	chain_always:nickel_wifi:disable
	chain_success:nickel_setting:disable:force_wifi
	chain_success:nickel_misc:rescan_books_full
This creates a Toggle FTP entry which toggles WiFi & starts/stops an FTP server on port 1021 (user: root, password: empty).

To check the IP of the device, you could use:

Code:
menu_item:main:Display IP:cmd_output:500:ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*'
  chain_failure:dbg_msg:No Network Connection
xyclonei is offline   Reply With Quote