DISCLAIMER: As always I'm not responsible if something happen to your mybookworld with this tutorial! There may be mistakes in the code, feel free to comment about any mistake you find.
Wget4web homepage : http://irodov.nm.ru/wget4web/
Also the wget4web works ok for downloading, loging and stoping/deleting a file while being download, but it fails reporting the download status or the name and number of files that have already been downloaded. If one knows how to fix this please add it to this tutorial.
1. Connect to mybook as root
2. Download wget4web
cd /tmp wget http://irodov.nm.ru/wget4web/wget4web-1.0.tar.gz
tar xvfz wget4web-1.0.tar.gz
4. Copy the files at the appropriate places.
mkdir /usr/www/lib/cgi-bin mv wget4web/ /usr/www/lib/cgi-bin/
5. Backup lighttpd.conf
cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.beforewget4web
6. Enable cgi in lighttpd
cd /etc/lighttpd/ vi lighttpd.conf **uncomment** #cgi.assign = ( ".cgi" => "/usr/bin/perl" ) (find the line, press I, go after # and press backspace) save and exit (press **:wq** with the : )
7. Restart lighttpd
8. Download another version of wget as the one installed is a cut off version…
ipkg install wget
this will install wget in /opt/bin/
9. Change the add.cgi file of wget4web to use the new wget binary.
cd /usr/www/lib/cgi-bin/wget4web nano add.cgi
change the line:
my $output = `wget -b -c -i $taskname -a $logname`;
my $output = `/opt/bin/wget -b -c -i $taskname -a $logname`;
save and exit
11. Create the nessesary subdirs and give them permissions.
mkdir /home/download chmod 755 /home/download cd /home/download/ mkdir files mkdir logs mkdir tasks chmod 777 files/ chmod 755 logs/ chmod 755 tasks/
12. Test it at:
You can change the user|password by editing the file:
The user|passwd doesn't have to be a system user. It refers only to wget4web.
The administrator user ("Black" with password "qwerty") -which can also be changed in the same file, has the previledge of stopping/deleting anyone's download -if there are many users!