As title say, is there a way to install lftp on this nas based on v2.x firmware?
Any alternative? I need to sync files with a remote ftp server, based on scheduled activity (check every hour).
Or can i install a different firmware on it?
As title say, is there a way to install lftp on this nas based on v2.x firmware?
Any alternative? I need to sync files with a remote ftp server, based on scheduled activity (check every hour).
Or can i install a different firmware on it?
5 days of life and already hacked. well, bye warranty (?)
anyway… if anyone else wants to achieve this pain in the *** that’s how i did it.
download the chrooted debian app
set the chroot environment. and here is a difference not well explained: on the mirror gen2 the path is /mnt/HD/HD_a2/Nas_Prog/Debian/chroot
lftp depends on some packages that are not available in the repository. i have grabbed them from these repository and installed manually using dpkg http://mwn-cdc.arsip.or.id/debian-security/pool/updates/main/b/bind9/
i have adjusted my personal mirror script (different shell) but i have achieved my purpose.
Well WD, overall it’s not a bad product but you need to improve it (is it really necessary busybox?)
Well, it has been a long time since my first post.
Today i want to share with you my personal lftp script.
Feel free to test, redistribute or modify it to suit your needs.
You don’t need brackets.
Some explanations first:
bye
#!/bin/bash
freespacestr=df -h | awk '$1=="/mnt/HD/HD_a2" {print $4}'
freespace=echo "${freespacestr%?}"
freespace=echo "${freespacestr:0:-3}"
spacestr=echo "${freespacestr: -1}"
if [ “$spacestr” == “T” ] || [ “$freespace” -gt 30 ]
then
cat <<EOF | chroot /mnt/HD/HD_a2/Nas_Prog/Debian/chroot /bin/bash
trap “rm -f /tmp/synctorrent.lock” INT TERM
if [ -e /tmp/synctorrent.lock ]
then
exit 1
_else _
touch /tmp/synctorrent.lock
lftp<<UPTOHERE
set net:limit-total-rate 0:0
set net:limit-total-max 0
set mirror:parallel-directories false
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ftp:ssl-protect-list true
_set net:connection-limit 10 _
set mirror:use-pget-n 10
set pget:min-chunk-size 100000000
set mirror:parallel-transfer-count 1
set mirror:parallel-directories false
set ssl:verify-certificate off
set net:connection-takeover true
open -p <port> -u <username>,<password> <address>
glob -d mirror --newer-than=now-7days -c --loop --only-missing </remote/ftp/folder> <“/local/nas/folder”>
quit 0
UPTOHERE
rm -f /tmp/synctorrent.lock
trap - INT TERM
exit 0
fi
EOF
else
bash /mnt/HD/HD_a2/script/notify.sh “Sync cancelled (free some space on the nas!)“
fi