Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
openwrt:mods [2015/08/03 19:02]
matthias [www offload] totally exchange of the commands
openwrt:mods [2017/12/16 07:54] (current)
comap89 [Install a tracker software]
Line 18: Line 18:
 ====== Calibre eBook Server on PirateBox ====== ====== Calibre eBook Server on PirateBox ======
 Thanks to PirateBox Forum member angrygnome, it is possible to set up your **PirateBox** as a **[[http://​calibre-ebook.com/​|Calibre]]** ebook library server using **[[http://​blog.slucas.fr/​en/​oss/​calibre-opds-php-server|COPS]]**. Check out **[[http://​forum.piratebox.cc/​read.php?​8,​7921,​7921#​msg-7921|this tutorial on the PirateBox Forum]]** for more info.  Thanks to PirateBox Forum member angrygnome, it is possible to set up your **PirateBox** as a **[[http://​calibre-ebook.com/​|Calibre]]** ebook library server using **[[http://​blog.slucas.fr/​en/​oss/​calibre-opds-php-server|COPS]]**. Check out **[[http://​forum.piratebox.cc/​read.php?​8,​7921,​7921#​msg-7921|this tutorial on the PirateBox Forum]]** for more info. 
 +
 +====== PirateBox 1.1.x mods ======
 +If not listed separately the documentation of 1.0.x applies.
 + 
 +===== Activate PHP =====
 +PHP should be ready to run. To activate PHP on PirateBox, you need to edit ''/​opt/​piratebox/​conf/​lighttpd/​lighttpd.conf''​ and remove the ''#''​ in front of the last line: ''#​include "/​opt/​piratebox/​conf/​lighttpd/​fastcgi-php.conf"''​
 +
 +The can be achieved with the following command, too:
 +
 +   sed -i -e '​s|^#​include "/​opt/​piratebox/​conf/​lighttpd/​fastcgi-php.conf"​|include "/​opt/​piratebox/​conf/​lighttpd/​fastcgi-php.conf"​|'​ \
 +     /​opt/​piratebox/​conf/​lighttpd/​lighttpd.conf
 +
 +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''​ - on OpenWrt on the USB stick ''<​usb>/​PirateBox/''​.
 +
 +===== Disable client isolation =====
 +Per default it is not permitted to connect directly to another client. To allow this, you need to disable the feature "AP isolation"​. Connect via SSH and run the following commands:
 +
 +   uci set wireless.@wifi-iface[0].isolate='​0'​
 +   uci commit
 +   ​reboot
  
  
Line 57: Line 77:
         option netmask '​255.255.255.0' ​                                                   ​         option netmask '​255.255.255.0' ​                                                   ​
  
 +**Since 1.1:** The next step is to change the referred IP in the firewall configuration. This can be done easily with that command:
  
-Restart your Scripts and reload your network-config on OpenWRT: ​  +  ​sed -i -e '​s|192.168.1.1|<​new IP>​|g' ​/etc/config/firewall 
-   /etc/init.d/network reload ​+ 
 +As the changes will drop in the connectivity,​ reboot the box: 
 + 
 +  reboot
    
 ==== Small python Forum ==== ==== Small python Forum ====
Line 106: Line 130:
   /​opt/​piratebox/​bin/​shoutbox_stuff.sh /​opt/​piratebox/​www /​opt/​piratebox/​conf/​piratebox.conf   /​opt/​piratebox/​bin/​shoutbox_stuff.sh /​opt/​piratebox/​www /​opt/​piratebox/​conf/​piratebox.conf
  
-==== Hostname ​==== +==== Hostname === 
-FIXME since 1.0 there is a command in install_piratebox.sh+Since PirateBox ​1.0 there is a command in install_piratebox.sh ​; this is the only thing needed. 
 + 
 +   /​opt/​piratebox/​bin/​install_piratebox.sh /​opt/​piratebox/​conf/​piratebox.conf hostname <new hostname>​
        
-4. Change hostname in the index.html **/​opt/​piratebox/​www/​index.html**+Before PirateBox 1.0: Change hostname in the file 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>​    <​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 personal ​directory-listing is described on the [[http://​redmine.lighttpd.net/​projects/​lighttpd/​wiki/​Docs:​ModDirlisting|Lighttpd wiki]]
  
 ==== PHP for PirateBox ==== ==== PHP for PirateBox ====
Line 175: Line 201:
     /​opt/​piratebox/​bin/​install_piratebox.sh /​opt/​piratebox/​conf/​piratebox.conf station_cnt ​     /​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:+That makes an entry into the 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     /​etc/​init.d/​cron enable && /​etc/​init.d/​cron start 
  
-Add the following line in the index.html file+Add the following line in the ''​index.html'' ​file
    <​div id="​station"​ class="​card"></​div> ​    <​div id="​station"​ class="​card"></​div> ​
  
 +**Note:** if you try to do the activation on the RPi version, you need to execute the following command to enable Cron:
 +
 +  sudo systemctl enable cronie
 +  sudo systemctl start cronie
 ==== www offload ==== ==== www offload ====
 This option is important for the OpenWRT users. You want a www folder on your USB stick? ​ This option is important for the OpenWRT users. You want a www folder on your USB stick? ​
  
-<div classes important>​We are going to disable the script exchange_www.sh with hotfix release 1.0.4 , even if the installation tells you to change something, it won't. The www_alt feature is disabled, please follow the instructions below.</​div>​+<div classes important>​We are going to disable the script exchange_www.sh with PirateBox ​hotfix release 1.0.4 , even if the installation tells you to change something, it won't. The www_alt feature is disabled, please follow the instructions below.</​div>​
  
 After finalizing your box, you can run the following set of commands while being connected via **ssh**. These commands will create a folder, where you can put your files to. After finalizing your box, you can run the following set of commands while being connected via **ssh**. These commands will create a folder, where you can put your files to.
Line 191: Line 221:
    mkdir -p /​opt/​piratebox/​share/​content    mkdir -p /​opt/​piratebox/​share/​content
    ln -s /​opt/​piratebox/​share/​content ​ /​opt/​piratebox/​www    ln -s /​opt/​piratebox/​share/​content ​ /​opt/​piratebox/​www
-   chown nobody:​nogroup /​opt/​piratebox/​share/​content +   ​chown ​-R nobody:​nogroup /​opt/​piratebox/​share/​content 
-   sed -i "​s|####​ #​HOST#####/​|#####​HOST####/​content|"​ /​opt/​piratebox/​src/​redirect.html.schema+   sed -i "​s|#####​HOST#####/​|#####​HOST#####/​content|"​ /​opt/​piratebox/​src/​redirect.html.schema
    . /​opt/​piratebox/​conf/​piratebox.conf    . /​opt/​piratebox/​conf/​piratebox.conf
-   sed "​s|####​ #​HOST#####​|${HOSTNAME}|"​ /​opt/​piratebox/​src/​redirect.html.schema > /​opt/​piratebox/​www/​redirect.html+   sed "​s|#####​HOST#####​|${HOSTNAME}|"​ /​opt/​piratebox/​src/​redirect.html.schema > /​opt/​piratebox/​www/​redirect.html
    mv /​opt/​piratebox/​www/​index.html /​opt/​piratebox/​www/​index_old.html    mv /​opt/​piratebox/​www/​index.html /​opt/​piratebox/​www/​index_old.html
    ln -s /​opt/​piratebox/​www/​redirect.html /​opt/​piratebox/​www/​index.html    ln -s /​opt/​piratebox/​www/​redirect.html /​opt/​piratebox/​www/​index.html
Line 200: Line 230:
  
 After this, you can power off your PirateBox and put your content to the "​content"​ folder. ​ After this, you can power off your PirateBox and put your content to the "​content"​ folder. ​
-==== bigger Image for webdata ====+==== Bigger image file size for webdata ====
 [[http://​ubuntuhak.blogspot.de/​2012/​10/​how-to-create-format-and-mount-img-files.html|How to create, format and mount .img files]] [[http://​ubuntuhak.blogspot.de/​2012/​10/​how-to-create-format-and-mount-img-files.html|How to create, format and mount .img files]]
  
Line 206: Line 236:
 If you want a regular changing MAC address for you hostspot, you can implement the script which is found [[https://​forum.openwrt.org/​viewtopic.php?​pid=213774#​p213774|on OpenWrt forum]]. [[http://​forum.piratebox.cc/​read.php?​16,​14001,​14159#​msg-14159|It is reported]] as working. If you want a regular changing MAC address for you hostspot, you can implement the script which is found [[https://​forum.openwrt.org/​viewtopic.php?​pid=213774#​p213774|on OpenWrt forum]]. [[http://​forum.piratebox.cc/​read.php?​16,​14001,​14159#​msg-14159|It is reported]] as working.
  
 +==== Install a Torrent tracker software ====
 +The [[http://​www.edoput.it/​blog/​2015/​08/​27/​a-decentralised-tracker/​|linked guide]] describes how to install a Torrent tracker to your PirateBox. You find support in [[http://​forum.piratebox.cc/​read.php?​16,​15678,​15678#​msg-15678|this forum topic]].