-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
103 lines (72 loc) · 4.08 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Obtain the OM updated version of LibraryBox 2.1 Core Script files from https://github.com/kirkdwilson/LibraryBox-core
Edited/Updates maintained by [email protected]
LibraryBox 2.1 Core script files.
Join the chat at https://gitter.im/LibraryBox-Dev/LibraryBox-core
Matthias Strubel 2013-07-24 [email protected]
This sourcecode is licenced under GPL-3
Preparation of the core scripts for LibraryBox on RapsberryPI and OpenWRT.
The Scripts are designed for reuse and modify only the base Piratebox Scripts instead of being a HARD fork from PBx.
To achieve this, LibraryBox uses the hook implementation (pre-prepared empty scripts for your own code) and changes a few files, if needed.
The workflow for creating the final source package is:
- clone this project
- do your modification in the "customization" folder
- run the following command, which results in the final "compilation" of all scripts into the directory "build" (changes made during build, see below)
make build
- To create a script package
# OpenWRT imagefile: make image
# Script package : make targz
# all together : make all
- To cleanup your build environment:
make clean
Folders
-------
customization = All stuff which should be copied over
customization/www_librarybox ==> Replaces the normal www folder of piratebox
Contains internet detection
Shoutbox Scripts
(...) see below
customization/www_content ==> is moved to /opt/piratebox/share/Content
Located on USB Stick
Contains all the presentation stuff
Contains presentation Templates for Statistic-Views
customization/www_content/dir-images ==> Icons displayed on directory listing; file-Types
icons by famfamfam
piratebox_origin = git subtree of PirateBoxScripts_Webserver branch "librarybox_dev" (see git subtree)
Normally you would choose some stable release, but because of LibraryBox is leapfrogging PirateBox I need to base on special branch to be able to push changes back and also the other way around. This can be later changed to "stable" branch
tmp_img = Customization for images and mount points
build_dir = Folder for including piratebox + LibraryBox stuff to complete the cake (Pirate Box + Library Box code)
LibraryBox-landingpage = git subtree of LibraryBox-landingpage branch master, contains the content of www_customization and others
Changes during build
--------------------
* Place normal configuration and script hooks, which are used
* Copy a template for the librarybox.us/ stuff (internet detection and so on)
* Copy a template for the content-folder librarybox.us/content
* Changing SSD in hostapd
* Change hostname in piratebox.conf
* Enable custom directory-listing file
* Enable PHP in lighttpd with FastCGI
New Features in www folder
--------------------------
dir-generator.php => KittyKat dir Listing with customization for counting downloads
Download-Statistics can be turned off here
Download-Statistics
-------------------
dl_statistics.conf.php => Configuration file for download Statistics
dl_statistics.func.php => Function pool for getting acces to dl-stats
dl_statistics_counter.php => Called by dir-generator.php if somebody downloads something
Redirects after counting to direct file-url
dl_statistics_display.php => Simple view into statistics (shows deleted files too)
http://librarybox.us/dl_statistics_display.php
Located in content: dl_statistics.html.php
=> Templates for display
Creates a SQLite file in /opt/piratebox/share called dl_statistics.sqlite
Visitor-Counter
---------------
vc.conf.php => Configuration file for Visitor counter
vc.func.php => Function Pool for visitor counter
vc_counter.php => Displays a transparent 1x1 gif and counts visitors
vc_display.php => Simple view into statistics
http://librarybox.us/vc_display.php
Located in content: vc_statistics.html.php
=> Templates for display
Creates a SQLite file in /opt/piratebox/share called /opt/piratebox/share/vc_statistics.sqlite