First off, can someone help me with services-start? Here's the steps I've done:
1.) jffs partition is enabled and not format on restart (confirmed that files do stay after reboot)
2.) I created the file services-start via nano under jffs/scripts/
3.) the following code is to have synctorrents.sh run every hour:
4.) I reboot and run "cru l" and I don't see the file being added.
Second issue that hopefully someone with lftp knowledge can help me out with. I created a script that pulls down torrents from my seedbox but I can't get it to remove the source files. When I add the line --Remove-source-files it breaks the string and tries to download the files to /jffs/scripts/ instead of the mounted drive I want to transfer to.
Here's the working code that just transfers the data to the mounted drive:
I tried changing
to
1.) jffs partition is enabled and not format on restart (confirmed that files do stay after reboot)
2.) I created the file services-start via nano under jffs/scripts/
3.) the following code is to have synctorrents.sh run every hour:
Code:
#!/bin/bash
cru a synctorrents "0 * * * * /jffs/scripts/synctorrents.sh"
Second issue that hopefully someone with lftp knowledge can help me out with. I created a script that pulls down torrents from my seedbox but I can't get it to remove the source files. When I add the line --Remove-source-files it breaks the string and tries to download the files to /jffs/scripts/ instead of the mounted drive I want to transfer to.
Here's the working code that just transfers the data to the mounted drive:
Code:
#!/bin/bash
login=<username>
pass=<password>
host=<host>
remote_dir=/files/complete/
local_dir=/mnt/DATA/SEEDBOX/
trap "rm -f /tmp/synctorrent.lock" SIGINT SIGTERM
if [ -e /tmp/synctorrent.lock ]
then
echo "Synctorrent is running already."
exit 1
else
touch /tmp/synctorrent.lock
lftp -u $login,$pass $host << EOF
set ftp:ssl-allow no
set mirror:use-pget-n 5
mirror -c -P5 --log=synctorrents.log $remote_dir $local_dir
quit
EOF
rm -f /tmp/synctorrent.lock
exit 0
fi
I tried changing
Code:
mirror -c -P5 --log=synctorrents.log $remote_dir $local_dir
Code:
mirror --Remove-source-files -c -P5 --log=synctorrents.log $remote_dir $local_dir