1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #132 from iiab/master

sync from iiab/iiab
This commit is contained in:
A Holt 2018-08-23 14:14:57 -04:00 committed by GitHub
commit a0a5c3638f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 79 additions and 68 deletions

View file

@ -1,49 +0,0 @@
<!DOCTYPE html>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="xs-portal.css" />
<HTML>
<HEAD>
<TITLE>Credits</TITLE>
</HEAD>
<BODY>
<h1>Internet-in-a-Box Credits</h1>
Internet-in-a-Box (formerly known as XSCE School Server) includes a variety of educational content and applications which are attributed as follows:<br><br>
All Wikipedia content is available for free at <a href="https://www.wikipedia.org/">www.wikipedia.org</a>.<br>
All other Wikimedia content is available for free via links at <a href="https://www.wikimedia.org/">www.wikimedia.org</a>.<br>
All Khan Academy content is available for free at <a href="https://www.khanacademy.org/">www.khanacademy.org</a>.<br>
All CK-12 content is available for free at <a href="https://www.ck12.org/">www.ck12.org</a>.<br>
All PhET Interactive Simulations content is available for free at <a href="https://phet.colorado.edu">phet.colorado.edu</a>.<br>
All MedLine content is available for free at <a href="https://medlineplus.gov/">medlineplus.gov</a>.<br>
All Hesperian content is available for free at <a href="https://hesperian.org/">hesperian.org</a>.<br>
Arabic translations of Hesperian content were done by Arab Resource Collective and are available for free at <a href="http://www.mawared.org">mawared.org</a>.<br>
All Gutenberg content is available for free at <a href="https://www.gutenberg.org/">www.gutenberg.org</a>.<br>
All OLPC content is available for free at <a href="http://wiki.laptop.org/go/Collections">wiki.laptop.org</a>.<br>
All MIT Scratch content is available for free at <a href="https://scratch.mit.edu">scratch.mit.edu</a>.<br>
All UNESCO's IICBA content is available for free at <a href="http://www.iicba.unesco.org/?q=elibrary">www.iicba.unesco.org/</a>.<br>
All Math Expression content is available for free at <a href="https://www.mathexpression.com/">www.mathexpression.com</a>.<br>
All Music Theory content is available for free at <a href="https://www.musictheory.net/">www.musictheory.net</a>.<br>
All HealthPhone content is available for free at <a href="http://www.healthphone.org/">www.healthphone.org</a>.<br>
All Centers for Disease Control content is available for free at <a href="https://www.cdc.gov/">www.cdc.gov</a>.<br>
All Global Emergency Medicine Wiki content is available for free at <a href="https://wikem.org/wiki/Main_Page">wikem.org/wiki/Main_Page</a>.<br><br>
Internet-in-a-Box also includes the work of content aggregators which we gratefully acknowledge:<br><br>
RACHEL is a curation of selected offline content at <a href="http://oer2go.org/">oer2go.org</a>.<br>
Kiwix is a ZIM server and repository of Wikimedia and other content in a compressed ZIM file format at <a href="http://www.kiwix.org/">www.kiwix.org</a>.<br>
KA Lite is a server and repository of Khan Academy content in various languages at <a href="https://learningequality.org/ka-lite/">learningequality.org/ka-lite</a>.<br><br>
Internet-in-a-Box also contains a number of applications each of which has its own attribution information, which is included.<br><br>
This Internet-in-a-Box distribution resides at <a href="https://github.com/iiab">github.com/iiab</a>.<br><br>
It is licensed under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.<br><br>
Licensing information may be found at <a href="https://github.com/iiab/iiab/blob/master/LICENSE.md">github.com/iiab/iiab/blob/master/LICENSE.md</a>.<br>
</BODY>
<script type="text/javascript" src="incl/xs-portal.js"></script>
</HTML>

View file

@ -3,6 +3,10 @@
<link rel="stylesheet" type="text/css" media="all" href="xs-portal.css" />
<HTML>
<HEAD>
<!-- THIS IS THE MASTER COPY. SECONDARY COPIES MAY ALSO EXIST WITHIN:
https://github.com/iiab/iiab-menu/blob/master/menu-files/html/credits.html
https://github.com/iiab/iiab-admin-console/blob/master/roles/console/files/index.html -->
<TITLE>Credits</TITLE>

View file

@ -160,6 +160,13 @@
# chdir: "{{ sugarizer_location }}/sugarizer/server"
# when: internet_available and is_F18 and not node_modules_exists
# Add a nodejs express function that appends a prefix to urls
- name: Install path prefix proxy
command: npm install --allow-root --unsafe-perm=true path-prefix-proxy
args:
chdir: "{{ sugarizer_location }}/{{ sugarizer_server_version }}"
when: internet_available
# 5. PLACE CONFIG FILES
- name: Configure sugarizer.service (systemd), sugarizer.conf (Apache) and sugarizer.ini
@ -173,6 +180,7 @@
- { src: 'sugarizer.ini', dest: '{{ sugarizer_location }}/{{ sugarizer_server_version }}/env/sugarizer.ini', mode: '0644' }
- { src: 'sugarizer.conf', dest: '/etc/apache2/sites-available', mode: '0644' }
- { src: 'sugarizer.service.j2', dest: '/etc/systemd/system/sugarizer.service', mode: '0644' }
- { src: 'sugarizer.js', dest: '/opt/iiab/sugarizer-server', mode: '0644' }
- name: Create symlink for short URL http://box/sugarizer
file:
@ -189,6 +197,12 @@
state: restarted
daemon_reload: yes
when: sugarizer_enabled
- name: Restart Apache so http://box/sugarizer works (not just http://box:8089)
systemd:
name: apache2
state: restarted
when: sugarizer_enabled
- name: 'Disable+stop systemd service if sugarizer_enabled: False'
systemd:

View file

@ -1,2 +1,2 @@
RewriteEngine on
RewriteRule ^/sugarizer(.*)$ http://localhost:8089$1 [PT]
ProxyPass /sugarizer http://localhost:8089/sugarizer
ProxyPassReverse /sugarizer http://localhost:8089/sugarizer

View file

@ -0,0 +1,43 @@
// require files
var express = require('express'),
http = require('http'),
https = require('https'),
settings = require('./config/settings'),
common = require('./dashboard/helper/common');
ini = settings.load(),
app = express(),
server = null;
// init common
common.init(ini);
//configure app setting
require('./config/main')(app, ini);
// include api routes
require('./api/route')(app, ini);
// include dashboard routes
require('./dashboard/route')(app, ini);
// Handle https
if (ini.security.https) {
var credentials = common.loadCredentials(ini);
if (!credentials) {
console.log("Error reading HTTPS credentials");
process.exit(-1);
}
server = https.createServer(credentials, app);
} else {
server = http.createServer(app);
}
var pathPrefix = '/sugarizer';
app.use(pathPrefix, require('path-prefix-proxy')(pathPrefix));
// Start listening
server.listen(ini.web.port,"0.0.0.0");
console.log("Sugarizer Server is listening on"+(ini.security.https ? " secure":"")+" port " + ini.web.port + "...");
//export app for testing
module.exports = app;

View file

@ -29,5 +29,5 @@ echo "deb http://raspbian.raspberrypi.org/raspbian/ testing main" > /etc/apt/sou
apt update
apt -y install calibre calibre-bin
rm /etc/apt/sources.list.d/rpi-testing.list
# Clears the cache of testing
# Clears the cache of rpi/testing
apt update

View file

@ -11,8 +11,7 @@ export DEBIAN_FRONTEND=noninteractive
echo "deb http://raspbian.raspberrypi.org/raspbian/ testing main" > /etc/apt/sources.list.d/rpi-testing.list
apt update
apt -y install calibre calibre-bin
## Removes last line, safer than: rm /etc/apt/sources.list.d/rpi-testing.list
#sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list
#sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list # Removes last line
rm /etc/apt/sources.list.d/rpi-testing.list
# Clears the cache of testing
# Clears the cache of rpi/testing
apt update

View file

@ -20,11 +20,11 @@ export DEBIAN_FRONTEND=noninteractive
apt -y install dirmngr
# Prepares to update to latest from debian testing
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 7638D0442B90D010
echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list.d/debian-testing.list
echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list.d/debian-testing.list
apt update
apt -y install libqt5core5a python-lxml calibre calibre-bin
## Removes last line, safer than: rm /etc/apt/sources.list.d/debian-testing.list
#sed -i '$ d' /etc/apt/sources.list.d/debian-testing.list
#apt -y install libqt5core5a python-lxml calibre calibre-bin
apt -y install calibre calibre-bin
#sed -i '$ d' /etc/apt/sources.list.d/debian-testing.list # Removes last line
rm /etc/apt/sources.list.d/debian-testing.list
# Clears the cache of testing
# Clears the cache of debian/testing
apt update

View file

@ -47,8 +47,8 @@ echo "deb http://raspbian.raspberrypi.org/raspbian/ testing main" > /etc/apt/sou
apt update
# Packages below cribbed from Calibre 3.23 installation on 2018-05-22, as recorded in /var/log/apt/history.log*
apt -y install libegl1 libegl-mesa0 libqt5sensors5 libbrotli1 libwoff1 libpodofo0.9.5 libjs-coffeescript python-regex libhyphen0 libqt5webchannel5 python-msgpack python-html5-parser libqt5positioning5 libpcre2-16-0 libglvnd0 libdrm-common python-sip libqt5svg5 libnih-dbus1 qt5-gtk-platformtheme libc6-dbg libqt5help5 libc6-dev libqt5dbus5 libqt5sql5-sqlite libc6 libqt5widgets5 locales libegl1-mesa python-pyqt5.qtsvg python-lxml fontconfig-config libqt5xml5 libgbm1 libqt5printsupport5 libqt5qml5 libc-l10n libqt5gui5 libc-bin libnih1 libqt5webkit5 python-pyqt5.qtwebkit libdrm2 libqt5core5a libfontconfig1 libqt5opengl5 libc-dev-bin python-pyqt5 libqt5network5 libqt5designer5 libqt5quick5 libqt5sql5
# BUT DO NOT DO "apt -y install calibre calibre-bin" UNTIL calibre-install-latest.sh
# Removes last line, safer than: rm /etc/apt/sources.list.d/rpi-testing.list
sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list
# Clears the cache of testing
# BUT DO NOT DO "apt -y install calibre calibre-bin" UNTIL calibre-install-latest.sh ?
#sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list # Removes last line
rm /etc/apt/sources.list.d/rpi-testing.list
# Clears the cache of rpi/testing
apt update

View file

@ -16,10 +16,10 @@
export DEBIAN_FRONTEND=noninteractive
# Prepares to update to latest from unstable
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 7638D0442B90D010
echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list.d/unstable.list
echo "deb http://deb.debian.org/debian unstable main" > /etc/apt/sources.list.d/debian-unstable.list
apt update
apt -y install calibre calibre-bin
# Removes last line, safer than: rm /etc/apt/sources.list.d/unstable.list
sed -i '$ d' /etc/apt/sources.list.d/unstable.list
# Clears the cache of testing and unstable
#sed -i '$ d' /etc/apt/sources.list.d/debian-unstable.list # Removes last line
rm /etc/apt/sources.list.d/debian-unstable.list
# Clears the cache of debian/unstable
apt update