Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
laptop:mods [2016/10/09 07:48] matthias [PirateBox Laptop Mods] add php mod for 1.1.0 |
laptop:mods [2017/07/07 07:27] (current) matthias [Modifications for PirateBox] |
||
---|---|---|---|
Line 16: | Line 16: | ||
Depending on you distribution, you need to check, if PHP path is limited to something. Search for the line ''doc_root = ''. | Depending on you distribution, you need to check, if PHP path is limited to something. Search for the line ''doc_root = ''. | ||
- | After this make a ''reboot''. | + | After this make a ''reboot''. All ''.php'' files are processed, as long as these are placed in the ''/content/'' folder. This folder is located in ''/opt/piratebox/share''. In fastcgi-php.conf, the thread limit is 1, if you run on a multiple core system you may want to increase it. |
- | ====== Modifications for PirateBox 1.0 ====== | + | |
==== Change SSID ==== | ==== Change SSID ==== | ||
Line 65: | Line 65: | ||
- | ==== Secured directories ==== | ||
- | With secured directories it is possible to save folder with passwords or simply upload into a folder structure. To enable this feature, find the following lines in **/opt/piratebox/conf/piratebox.conf** | ||
- | |||
- | ## Droopy Userdir Option? | ||
- | DROOPY_USERDIR="" | ||
- | # Uncomment the following line to enable Userdirs | ||
- | #DROOPY_USERDIR="-u True" | ||
- | | ||
- | Remove the # in the last line and restart your PirateBox-Scripts. | ||
==== Exchange Upload-Folder ==== | ==== Exchange Upload-Folder ==== | ||
Line 96: | Line 87: | ||
==== Hostname ==== | ==== Hostname ==== | ||
+ | Simply run the following command | ||
+ | |||
+ | sudo /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf hostname my_new_hostname | ||
- | FIXME new command line option in install_piratebox.sh | ||
- | |||
- | 4. Change hostname in the index.html **/opt/piratebox/www/index.html** | ||
- | <iframe width='650' frameBorder='0' src='http://piratebox.lan:8080'>Your browser does not supprt Iframes.. If you want to upload something, follow this <a href='http://piratebox.lan:8080'>Link</a></iframe> | ||
==== Custom Directory Listing ==== | ==== Custom Directory Listing ==== | ||
How to customize your personall directory-listing is described on the [[http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModDirlisting|Lighttpd wiki]] | How to customize your personall directory-listing is described on the [[http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModDirlisting|Lighttpd wiki]] | ||
+ | |||
+ | |||
+ | ==== Show connected clients ==== | ||
+ | There is a script, which greps the needed informations from "iw". It was designed to run on OpenWRT, but it might work on laptops, too. | ||
+ | If you want to use this, run the following command: | ||
+ | |||
+ | /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf station_cnt | ||
+ | | ||
+ | The makes an entry to your crontab of the current user. It updates a station_cnt.txt file in /opt/piratebox/www every 2 minutes. On **OpenWRT you have to** ensure, that the cron daemon runs: | ||
+ | |||
+ | /etc/init.d/cron enable && /etc/init.d/cron start | ||
+ | |||
+ | |||
+ | ==== Calibre OPDS ==== | ||
+ | |||
+ | FIXME create an Laptop RPi version of this | ||
+ | |||
+ | Some of our member wrote a great tutorial to get the software running: [[http://forum.daviddarts.com/read.php?8,7921,7957#msg-7957|PirateBox + COPS (Calibre OPDS (and HTML) PHP Server)]] | ||
+ | |||
+ | ==== OpenStreetMap on Piratebox ==== | ||
+ | |||
+ | FIXME create an Laptop RPi version of this | ||
+ | |||
+ | [[https://github.com/reinvented/openstreetbox|PirateBox + OpenStreetMap]] | ||
==== PHP for PirateBox ==== | ==== PHP for PirateBox ==== | ||
Line 147: | Line 161: | ||
ln -s /mnt/usb/PirateBox/wiki /opt/piratebox/www/php/wiki | ln -s /mnt/usb/PirateBox/wiki /opt/piratebox/www/php/wiki | ||
- | |||
- | ==== Show connected clients ==== | ||
- | There is a script, which greps the needed informations from "iw". It was designed to run on OpenWRT, but it might work on laptops, too. | ||
- | If you want to use this, run the following command: | ||
- | |||
- | /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf station_cnt | ||
- | | ||
- | The makes an entry to your crontab of the current user. It updates a station_cnt.txt file in /opt/piratebox/www every 2 minutes. On **OpenWRT you have to** ensure, that the cron daemon runs: | ||
- | |||
- | /etc/init.d/cron enable && /etc/init.d/cron start | ||
- | |||
- | ==== www offload ==== | ||
- | This option is important for the OpenWRT users. You want a www folder on your USB stick? | ||
- | Put your folder to | ||
- | |||
- | <usb device>/PirateBox/www_alt | ||
- | |||
- | Then install your box or run the following commands on your box | ||
- | |||
- | /etc/init.d/piratebox stop | ||
- | /etc/init.d/piratebox updatePB | ||
- | /etc/init.d/piratebox start | ||
- | | ||
- | The folder is recognized, if the following message apears: | ||
- | <code> | ||
- | ---------------------------------------------------- | ||
- | #### Alternative www folder found #### | ||
- | #### /mnt/usb/PirateBox/www_alt #### | ||
- | #### switching directories #### | ||
- | ---------------------------------------------------- | ||
- | </code> | ||
- | |||
- | |||
- | ==== Calibre OPDS ==== | ||
- | |||
- | FIXME create an Laptop RPi version of this | ||
- | |||
- | Some of our member wrote a great tutorial to get the software running: [[http://forum.daviddarts.com/read.php?8,7921,7957#msg-7957|PirateBox + COPS (Calibre OPDS (and HTML) PHP Server)]] | ||
- | |||
- | ==== OpenStreetMap on Piratebox ==== | ||
- | |||
- | FIXME create an Laptop RPi version of this | ||
- | |||
- | [[https://github.com/reinvented/openstreetbox|PirateBox + OpenStreetMap]] | ||