From 4a5f881814fe43b2fefd8ed2937e0231531372b3 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Tue, 11 Apr 2017 06:33:04 +0200 Subject: [PATCH 1/9] initd: fix miniircd startup miniircd can not handle quotations correctly --- piratebox/piratebox/init.d/piratebox | 4 ++-- piratebox/piratebox/init.d/piratebox_alt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/piratebox/piratebox/init.d/piratebox b/piratebox/piratebox/init.d/piratebox index b4862db..5d0c443 100755 --- a/piratebox/piratebox/init.d/piratebox +++ b/piratebox/piratebox/init.d/piratebox @@ -200,10 +200,10 @@ case "$1" in . $CONF_IRC - IRC_PARMS="--setuid $IRC_USER --daemon --motd '$IRC_MOTD' " + IRC_PARMS="--setuid $IRC_USER --daemon --motd $IRC_MOTD " if [ ! -z "$IRC_STATEDIR" ] ; then - IRC_PARMS=" $IRCPARMS --statedir '$IRC_STATEDIR' " + IRC_PARMS=" $IRCPARMS --statedir $IRC_STATEDIR " fi log_daemon_msg "Starting Miniircd..." diff --git a/piratebox/piratebox/init.d/piratebox_alt b/piratebox/piratebox/init.d/piratebox_alt index e2c27b5..f5cb1f5 100755 --- a/piratebox/piratebox/init.d/piratebox_alt +++ b/piratebox/piratebox/init.d/piratebox_alt @@ -192,10 +192,10 @@ case "$1" in #Start IRC Server if [ "$ENABLE_IRC_SERVER" = "yes" ] ; then . $CONF_IRC - IRC_PARMS="--setuid $IRC_USER --daemon --motd '$IRC_MOTD' " + IRC_PARMS="--setuid $IRC_USER --daemon --motd $IRC_MOTD " if [ ! -z "$IRC_STATEDIR" ] ; then - IRC_PARMS=" $IRCPARMS --statedir '$IRC_STATEDIR' " + IRC_PARMS=" $IRCPARMS --statedir $IRC_STATEDIR " fi echo "Starting Miniircd..." start-stop-daemon $DROOPY_USER -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS From 7a667bfe2f6cc4b4a371c83b0c84bee1baf03e1e Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Tue, 11 Apr 2017 07:15:14 +0200 Subject: [PATCH 2/9] initd: minircd startup fix setuid remove setuid option, because start-stop-daemon already does --- piratebox/piratebox/init.d/piratebox | 4 ++-- piratebox/piratebox/init.d/piratebox_alt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/piratebox/piratebox/init.d/piratebox b/piratebox/piratebox/init.d/piratebox index 5d0c443..64ca168 100755 --- a/piratebox/piratebox/init.d/piratebox +++ b/piratebox/piratebox/init.d/piratebox @@ -200,14 +200,14 @@ case "$1" in . $CONF_IRC - IRC_PARMS="--setuid $IRC_USER --daemon --motd $IRC_MOTD " + IRC_PARMS="--daemon --motd $IRC_MOTD " if [ ! -z "$IRC_STATEDIR" ] ; then IRC_PARMS=" $IRCPARMS --statedir $IRC_STATEDIR " fi log_daemon_msg "Starting Miniircd..." - start-stop-daemon $DROOPY_USER -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS + start-stop-daemon $IRC_USER -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS log_end_msg $? fi fi diff --git a/piratebox/piratebox/init.d/piratebox_alt b/piratebox/piratebox/init.d/piratebox_alt index f5cb1f5..0e6b1c3 100755 --- a/piratebox/piratebox/init.d/piratebox_alt +++ b/piratebox/piratebox/init.d/piratebox_alt @@ -192,13 +192,13 @@ case "$1" in #Start IRC Server if [ "$ENABLE_IRC_SERVER" = "yes" ] ; then . $CONF_IRC - IRC_PARMS="--setuid $IRC_USER --daemon --motd $IRC_MOTD " + IRC_PARMS="--daemon --motd $IRC_MOTD " if [ ! -z "$IRC_STATEDIR" ] ; then IRC_PARMS=" $IRCPARMS --statedir $IRC_STATEDIR " fi echo "Starting Miniircd..." - start-stop-daemon $DROOPY_USER -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS + start-stop-daemon $IRC_USER -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS echo $? fi fi From 96c14538496216d548d5d1fdb0b6b3d8dea9b5b8 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sun, 30 Apr 2017 09:38:09 +0200 Subject: [PATCH 3/9] mime.types: Adding gpx mime-type --- piratebox/piratebox/conf/lighttpd/mime.types | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piratebox/piratebox/conf/lighttpd/mime.types b/piratebox/piratebox/conf/lighttpd/mime.types index 1218720..b511959 100644 --- a/piratebox/piratebox/conf/lighttpd/mime.types +++ b/piratebox/piratebox/conf/lighttpd/mime.types @@ -87,7 +87,7 @@ mimetype.assign = ( ".epub" => "application/epub+zip", ".fb2" => "text/xml", ".svg" => "image/svg+xml", - + ".gpx" => "application/gpx+xml", # make the default mime type application/octet-stream. "" => "application/octet-stream", ) From cf0869f2c2eb0bf4badd5c7c5f086798861c271f Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sun, 7 May 2017 20:24:00 +0200 Subject: [PATCH 4/9] RPi, switch client: Fix path --- piratebox/piratebox/rpi/bin/do_switch_client.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piratebox/piratebox/rpi/bin/do_switch_client.sh b/piratebox/piratebox/rpi/bin/do_switch_client.sh index 9234778..712f7be 100755 --- a/piratebox/piratebox/rpi/bin/do_switch_client.sh +++ b/piratebox/piratebox/rpi/bin/do_switch_client.sh @@ -3,7 +3,7 @@ # Wrapper script for the steps to enable wifi client systemctl stop piratebox -if /opt/piratebox/rpi/run_client.sh ; then +if /opt/piratebox/rpi/bin/run_client.sh ; then echo "Started Wifi client sucessfully!" exit 0 else From 89165c03a7701af43d4dce8b847079e38780a32c Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sun, 14 May 2017 12:49:55 +0200 Subject: [PATCH 5/9] install_piratebox.sh : fix distribute directory listing files Do not distribute custom directory listing files during init if that was disabled in piratebox.conf. This is needed for customization. --- piratebox/piratebox/bin/install_piratebox.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/piratebox/piratebox/bin/install_piratebox.sh b/piratebox/piratebox/bin/install_piratebox.sh index 7a6e932..116098c 100755 --- a/piratebox/piratebox/bin/install_piratebox.sh +++ b/piratebox/piratebox/bin/install_piratebox.sh @@ -66,7 +66,9 @@ if [ $2 = 'part2' ] ; then mkdir -p $PIRATEBOX_FOLDER/tmp #Distribute the Directory Listing files - $PIRATEBOX_FOLDER/bin/distribute_files.sh $SHARE_FOLDER/Shared true + if [ "$CUSTOM_DIRLIST_COPY" = "yes" ] ; then + $PIRATEBOX_FOLDER/bin/distribute_files.sh $SHARE_FOLDER/Shared true + fi #Set permissions chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $PIRATEBOX_FOLDER/share -R chmod u+rw $PIRATEBOX_FOLDER/share From 9eebea7d6e5ad2db1b6616231e0ee58d79cc9125 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Tue, 16 May 2017 06:59:53 +0200 Subject: [PATCH 6/9] locale, de: Fix grammar --- piratebox/piratebox/www_content/locales/data.de.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piratebox/piratebox/www_content/locales/data.de.properties b/piratebox/piratebox/www_content/locales/data.de.properties index af08f18..cb5b8d0 100644 --- a/piratebox/piratebox/www_content/locales/data.de.properties +++ b/piratebox/piratebox/www_content/locales/data.de.properties @@ -10,7 +10,7 @@ logoIMG.alt = PirateBox logoIMG.title = PirateBox - Share Freely welcomeWelcome = Willkommen -welcomeDescription.innerHTML = Das Wichtigste vorweg: Hier geht nichts Illegales oder Unheimliches vor. Dies ist ein sozialer Platz, wo jeder chatten und Dateien austauschen kann und zwar anonym! Dies ist ein Offline-Netzwerk, speziell zum Filesharing und Chatten entwickelt. Vom Netz getrennt zu sein, ist die Voraussetzung für volle Anonymität. Hab Spaß, chatte mit Menschen und teile Dateien, die du magst. +welcomeDescription.innerHTML = Das Wichtigste vorweg: Hier geht nichts Illegales oder Unheimliches vor. Dies ist ein sozialer Platz, wo jeder chatten und Dateien austauschen kann und zwar anonym! Dies ist ein Offline-Netzwerk, speziell zum Filesharing und Chatten entwickelt. Vom Netz getrennt zu sein ist die Voraussetzung für volle Anonymität. Hab Spaß, chatte mit Menschen und teile Dateien, die du magst. welcomeThanksButton.value = Alles klar! sidebarUpload = Upload -> sidebarIframeNotSupported = Dein Browser unterstützt keine Iframes. Wenn du etwas hochladen möchtest, hier entlang: From 36548a457245e7d0e7537dda7a27ef63d988dcde Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Mon, 22 May 2017 07:35:36 +0200 Subject: [PATCH 7/9] Remove redirect.html, now make use of index.html only --- development/lighttpd_extra.conf | 2 +- development/lighttpd_inside.conf | 2 +- piratebox/piratebox/bin/install_piratebox.sh | 2 +- piratebox/piratebox/conf/lighttpd/lighttpd.conf | 2 +- piratebox/piratebox/www/redirect.html | 11 ----------- 5 files changed, 4 insertions(+), 15 deletions(-) delete mode 100755 piratebox/piratebox/www/redirect.html diff --git a/development/lighttpd_extra.conf b/development/lighttpd_extra.conf index 3a0741b..f1f7aa8 100644 --- a/development/lighttpd_extra.conf +++ b/development/lighttpd_extra.conf @@ -81,7 +81,7 @@ $HTTP["url"] =~ "^/board/" { # 404 Error Page with redirect # -#server.error-handler-404 = "/redirect.html" +#server.error-handler-404 = "/index.html" ## for better debugging #server.modules += ( "mod_accesslog" ) diff --git a/development/lighttpd_inside.conf b/development/lighttpd_inside.conf index 2e0ce8f..7800674 100644 --- a/development/lighttpd_inside.conf +++ b/development/lighttpd_inside.conf @@ -81,7 +81,7 @@ $HTTP["url"] =~ "^/board/" { # 404 Error Page with redirect # -#server.error-handler-404 = "/redirect.html" +#server.error-handler-404 = "/index.html" ## for better debugging #server.modules += ( "mod_accesslog" ) diff --git a/piratebox/piratebox/bin/install_piratebox.sh b/piratebox/piratebox/bin/install_piratebox.sh index 116098c..fdc08a1 100755 --- a/piratebox/piratebox/bin/install_piratebox.sh +++ b/piratebox/piratebox/bin/install_piratebox.sh @@ -163,7 +163,7 @@ fi set_hostname() { local name=$1 ; shift; - sed "s|#####HOST#####|$name|g" $PIRATEBOX_FOLDER/src/redirect.html.schema > $WWW_FOLDER/redirect.html + sed "s|#####HOST#####|$name|g" $PIRATEBOX_FOLDER/src/redirect.html.schema > $WWW_FOLDER/index.html sed "s|HOST=\"$HOST\"|HOST=\"$name\"|" -i $PIRATEBOX_CONFIG } diff --git a/piratebox/piratebox/conf/lighttpd/lighttpd.conf b/piratebox/piratebox/conf/lighttpd/lighttpd.conf index dfac75b..7eeda78 100644 --- a/piratebox/piratebox/conf/lighttpd/lighttpd.conf +++ b/piratebox/piratebox/conf/lighttpd/lighttpd.conf @@ -99,7 +99,7 @@ setenv.add-response-header += ( "Cache-Control" => "max-age=60, must-revalidate, # 404 Error Page with redirect # -server.error-handler-404 = "/redirect.html" +server.error-handler-404 = "/indext.html" ## for better debugging #server.modules += ( "mod_accesslog" ) diff --git a/piratebox/piratebox/www/redirect.html b/piratebox/piratebox/www/redirect.html deleted file mode 100755 index 81848cc..0000000 --- a/piratebox/piratebox/www/redirect.html +++ /dev/null @@ -1,11 +0,0 @@ - -Redirect... - - - - - - -Redirect - - From a881760aba1756496a13e85ce5a60d0622a348ba Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Mon, 22 May 2017 07:39:28 +0200 Subject: [PATCH 8/9] CHANGELOG: First change list --- CHANGELOG | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 087b728..3d83ab9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,13 @@ CHANGELOG +=== 1.1.4 === +* [New] Removed legacy redirect.html, use /index.html only +* [New] install_piratebox.sh, avoid distribution of index files, if turned off. +* [New] mime.types: Adding gpx mime-type +* [Fix] lang-de ; fix grammar +* [Fix] [RPi] Fix wrong path in wifi client helper script +* [Fix] initd: minircd startup fix setuid + === 1.1.3 === * [New] Translation bt-pr * [New] [RPi] Helper scripts to jump to wifi client mode From 79bc6ff972682af43de5ac43f790f212fdf7e8f3 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Mon, 22 May 2017 08:07:11 +0200 Subject: [PATCH 9/9] content scripts.js : Fix syntax error which broke jQuery --- piratebox/piratebox/www_content/js/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piratebox/piratebox/www_content/js/scripts.js b/piratebox/piratebox/www_content/js/scripts.js index cf2e829..f70d67d 100755 --- a/piratebox/piratebox/www_content/js/scripts.js +++ b/piratebox/piratebox/www_content/js/scripts.js @@ -68,7 +68,7 @@ $(document).ready(function() { var locationPath = filterPath(location.pathname); var scrollElem = scrollableElement('html', 'body'); - $('a[href*=#]').each(function() { + $('a[href*=\\#]').each(function() { var thisPath = filterPath(this.pathname) || locationPath; if ( locationPath == thisPath && (location.hostname == this.hostname || !this.hostname)