OpenWRT Piratebox 0.5.1 with lighttpd

Posted by Matthias 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 03, 2012 05:52PM
Matthias, first of all, you are a genius! I've just upgraded from 0.3.2 to 0.5.1 on my MR3020 and it runs beautifully. I've installed the Kareha image board and it also runs great.

Here is what I did to upgradeā€¦

1. Turned on my PirateBox and SSHed into it:

ssh root@192.168.1.1

2. Edited my network file to ensure that I could connect my PirateBox to my home router via ethernet cable and access the internet:

vi /etc/config/network

My home router's IP address is 192.168.2.1 and thus I made sure my network file settings looked like this:

config interface 'loopback'                                                               
        option ifname 'lo'                                                                
        option proto 'static'                                                             
        option ipaddr '127.0.0.1'                                                         
        option netmask '255.0.0.0'                                                        
                                                                                          
config interface 'lan'                                                                    
        option ifname 'eth0'                                                              
        option type 'bridge'                                                              
        option proto 'static'                                                             
        option ipaddr '192.168.2.111'                                                       
        option netmask '255.255.255.0'                                                    
        option gateway '192.168.2.1'                                                     
        list dns '192.168.2.1'                                                           
        list dns '8.8.8.8'

3. Connected my PirateBox to my home router via ethernet cable, rebooted and SSHed into it:

ssh root@192.168.2.111

4. Stopped and removed the current PirateBox install:

/etc/init.d/piratebox stop
opkg remove piratebox

5. Stopped my PirateBox from handing out DNS:

/etc/init.d/piratebox nodns

6. Pinged google to make sure I could access the internet:

ping google.com

7. Installed PirateBox 0.5.1

Language: PHP
cd /tmp wget http://piratebox.aod-rpg.de/piratebox_0.5.1_all.ipk opkg install piratebox*

8. Installed the Kareha image board via Matthias' awesome installation script:

/opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf imageboard

9. Edited the kareha image board config to change my admin username and password (ADMIN_PASS and SECRET):

 
vi /opt/piratebox/www/board/config.pl

10. Unplugged the ethernet cable and rebooted. Joined the PirateBox - Share Freely wireless network.



Edited 2 time(s). Last edit at 06/04/2012 01:29AM by darts.
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 03, 2012 09:06PM
Hi David,
thanks for the nice feedback and the detailed howto .. Somehow, I'm not very well in step by step howtos eye rolling smiley

> Note: the install script tells you to edit /opt/piratebox/www/board/config.pl but the config file is now located at:
Yes you are right. but /opt/piratebox/www/board/ is linked to /mnt/usb/PirateBox/board/ - so it should work, too - did it?

kind regards
Matthias
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 04, 2012 12:10AM
Matthias Wrote:
-------------------------------------------------------
> Hi David,
> thanks for the nice feedback and the detailed
> howto .. Somehow, I'm not very well in step by
> step howtos eye rolling smiley

Well, we're a good team!

> > Note: the install script tells you to edit
> /opt/piratebox/www/board/config.pl but the config
> file is now located at:
> Yes you are right. but /opt/piratebox/www/board/
> is linked to /mnt/usb/PirateBox/board/ - so it
> should work, too - did it?

No, the link didn't work for me which is why I had to use the /mnt file path.

Ok, I've just retested and the link works...must have mistyped before. Sorry! I've updated my post above.

A dumb question for you...

How do I edit the "4. Discuss about it here." text on the landing page? I couldn't find anything in the index.html file...I'd like to change the text to: "Visit the PirateBox Image Board here."

Thanks!



Edited 1 time(s). Last edit at 06/04/2012 01:28AM by darts.
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 04, 2012 04:34AM
Hi david,
no problem! But I recognized, that this hint-message should be more dynamic based on the configuration and not statically coded.

The line "Discuss about it here" is loaded via JavaScript out of the file www/forum.html

Matthias
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 04, 2012 06:49PM
I've upgraded my PirateBox, thank you for such a good work !

PF
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 04, 2012 06:50PM
Dear Matthias,

YOU ARE A GENIUS! The new setup is MUCH faster on my MR3020. I run some fairly large HTML pages in one of my directories, and i found with 0.3.2 that they would cause the router to flood itself on occasion. while this was rare, it was as you could easily guess... annoying winking smiley. I have noticed IMMENSE improvements with this version. I assume this to be the fact that lighttpd is now being used as opposed to python. Haven't had a flood in 2 full days of 80+ clients (used to get about 3 every day with less than 10 clients). Either way GREAT, GREAT WORK. This goes a long way in making "Boxing" even easier for borderline enthusiasts like myself. I had one question though... I have been fiddling about with piratebox.conf, and found the advanced upload feature, which is epic, but i was wondering...


is there a way to allow only users with a password to CREATE directories (Public or Private)? And hide the contents of Private directories from those without a password? If not, is this possible to roll into the UI update that we've been hearing about? I am a computer animation teacher here in Brisbane, and my students use the box to store their work. If i could create a directory to host my personal documents (Grading, Tests, Schedules, etc) in a private directory that is innaccessible to my students, while still having folders for each of them that would be AWESOME.

Thanks!

Australia hails Matthias for his service!
-Johann
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 05, 2012 07:26AM
Hi,
thanks for the feedback smiling smiley

I read your block about your testing, and I think I read something else about it.
Currently, It is not possible to not show folders without password. I can understand your whish for the feature. There is one possibility for reaching a nearly the feature your want.. somehow modify droopy to create an empty index.html on default .... this disables the directory listing- but the files are still accessible.

OR, you are changing the the upload folder to something totally different on the usb device.

Matthias
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 05, 2012 07:55AM
Hi,

Can we now upload files directly into specific directories ? If so, I still have not found how to.

Thx !

PF
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 05, 2012 07:59AM
You can change the default upload folder and you can activate a "custom destination with/without password" function.
Last you need to restart the piratebox.
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 06, 2012 02:45PM
I will upgrade tonight. I'm excited to see what goodies are in this new version. thumbs up

nothing to see here, no longer here.
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 07, 2012 11:45AM
Hi all,

I've finally got a new MR3020 and have uploaded the new PB, including the new imageboard hooray.

I've only got one small bug, iOS devices are having Captive Portal issues. Was this issued solved with this version of PB or do I need to upgrade the img as per http://forum.daviddarts.com/read.php?2,2887

According to 'cat /opt/piratebox/version' I have:
piratebox-ws_0.2.0

Cheers,
Dr H
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 07, 2012 11:47AM
Thank you Matthias, how can I activate a "custom destination with/without password" function ?

PF
Re: OpenWRT Piratebox 0.5.1 with lighttpd
June 07, 2012 01:50PM
Check piratebox.conf there is a switch for enable it
after this restart your box
Re: OpenWRT Piratebox 0.5.1 with lighttpd
August 03, 2012 05:15PM
Hi everyone,

I am looking for translating the landing page :

1. Learn more about the projects here
2. Click button below to begin sharing
2. Browse and download files here.

Could you please tell me which file to modify and where it is located ?

Thanks

PF
Re: OpenWRT Piratebox 0.5.1 with lighttpd
August 03, 2012 05:52PM
/opt/piratebox/www/* smiling smiley
Re: OpenWRT Piratebox 0.5.1 with lighttpd
August 03, 2012 05:54PM
Great ! Thank you, I guess that the filename is index ;-)

PF
Re: OpenWRT Piratebox 0.5.1 with lighttpd
August 03, 2012 05:55PM
yes tongue sticking out smiley
RDT
Re: OpenWRT Piratebox 0.5.1 with lighttpd - Slower?
August 24, 2012 01:16AM
All is working well with my TL-WR703N, including the Nagren UI pages.

However, the file upload is very slow. If I watch the upload vi ssh, the file upload is complete long before lighttpd indicates that it is complete. Is this normal? Is there anyway to get lighttpd to return as soon as the upload is complete?
Re: OpenWRT Piratebox 0.5.1 with lighttpd - Slower?
August 24, 2012 05:15AM
hi,
I have to check what is going on. The upload is not process by lighttpd, It is processed by droppy- it is a python scripts, which handles the effect on the system load much better then upload via webserver ( the argument is for OpenWRT systems).

Matthias
Re: OpenWRT Piratebox 0.5.1 with lighttpd
September 15, 2012 01:45PM
I'm curious if for the upgrade it will leave in tact the content from my 0.3 Pbox? I do have it backed up but was curious how it interacted with what looks like a new directory structure,
Re: OpenWRT Piratebox 0.5.1 with lighttpd
September 15, 2012 01:49PM
well, If your uploaded content is located in the regular folders you will only loose customized content.

Matthias
Hello and thank you for your work !
I'm having a problem with the forum, when I try to delete a post this is what I get :

Software error:

Can't locate Data/Dumper.pm in @INC (@INC contains: /usr/lib/perl5/5.10 .) at /opt/piratebox/www/board/kareha.pl line 8.
BEGIN failed--compilation aborted at /opt/piratebox/www/board/kareha.pl line 8.

For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
Re: OpenWRT Piratebox 0.5.1 with lighttpd
November 11, 2012 11:22AM
then the perl package Data:grinning smileyumper is missing. you need to install the package with

opkg -d piratebox install perlbase-data
Yes Thank you.
Actually I resolved my problem by executing again the kareha installation script :
/opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf imageboard
hey,

I just wanna ask, is it possible for me to use the box to access my own server/storage devices?

thanks
Re: OpenWRT Piratebox 0.5.1 with lighttpd
January 07, 2013 05:48AM
I think so, but can you describe it a bit more, what you want to do??
Re: OpenWRT Piratebox 0.5.1 with lighttpd
January 15, 2013 03:57AM
Ok I've tried and tried but I can't get the Piratebox 0.5.1 on my MR3020 by following the tutorial on [wiki.daviddarts.com] and the upgrade tutorial on this thread. When I cat /opt/piratebox/version it says its version 0.3.1 for both the clean install and upgrade path. IDK what's going on and I've even tried to update by changing out the piratebox_WS_img.tar.gz file in the usb. It also says it's version 0.3.1.

Any help would be greatly appreciated thanks.

-hardrived
Re: OpenWRT Piratebox 0.5.1 with lighttpd
January 16, 2013 05:14PM
hardrived,

my box also says that I am using version 0.3.1
However, as far as I know lighttpd was introduced in version 0.5.1, that I have and use happily. Moreover I remember that I installed the 0.5.1 package as well, so I am happy with it.

Matthias would know this, but there might be a version number issue (or we are just looking at the wrong version file?).

I think as long as you have lighttpd on your box, it's OK. This should have no impact on how you use your box, keep using it until this gets clarified.
Re: OpenWRT Piratebox 0.5.1 with lighttpd
January 16, 2013 07:09PM
Hi,
stay cool smiling smiley everything is ok.
It was a issue done by my idea behind the version number. These days (2 years ago) I thought not that this could be a issue.

In the next version (0.6) I'll fix that. I raized both package version numbers up to 0.6 .. so this issue will be done after the next release.


Matthias