MaStr/mkPirateBox

www directory location

eby opened this issue · 6 comments

eby commented

Thanks for the lighttpd integration. Makes many things much easier

Is there any reason not to move the entire www directory to the usb drive?

Maybe have the init process copy it and create symlink. It then makes editing of the entire landing site and static resources simple.

I moved it manually and set up a symlink in opt vs changing the lighttpd config and haven't noticed any issues so far.

Or is it presumed that it should be able to run sans drive.

Hi, Nice idea!
But with moving www to the fat32 USB drive your are losing the option to use symlinks in www. (correct file permissions, too)
Symlinks are used to link to the board folder in case of using the imageboard.

adding the board is possible with using alias function of lighttpd.

Matthias

What about detecting if www its existent on USB drive and then create a symlink ; if not leave everything as it is

What do you think about that?

eby commented

Thanks, figured there was something I wasn't using that required it.

That sounds like a potential solution or maybe moving static files into a subdirectory and having that be served as / with the other directories set up as aliases. Haven't had time to test out more lighttpd configs.

eby commented

related to this, is there a reason the files in /opt are not expanded from the image into the git repository, instead of just the installer control/data?

Because the stuff in /opt/piratebox is identical with Debian- & Live-DVD Version it is separated into a second github repository.
mkPirateBox contains only the OpenWRT integration.

Check this repository: https://github.com/MaStr/PirateBoxScripts_Webserver
There is a Makefile included for generating the image-file

Kind regards Matthias

eby commented

Thanks for all the info. Closing as your reasoning for the location is valid.

I think it is easy enough for people to set up the symlink themselves if needed.