From 6104d4731a3969cd27e0fa26d386c606fd3a328a Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Wed, 5 Oct 2016 20:53:53 +0200 Subject: [PATCH 01/25] Fix some shell incompatibilities --- CHANGELOG | 3 +++ piratebox/piratebox/bin/json_generation.sh | 2 +- piratebox/piratebox/init.d/piratebox | 2 +- piratebox/piratebox/init.d/piratebox_alt | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f84b9f0b..026bc2c3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ CHANGELOG +=== 1.1.3 === +* [Fix] Some shell incompatibilities + === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink diff --git a/piratebox/piratebox/bin/json_generation.sh b/piratebox/piratebox/bin/json_generation.sh index cfcf27b3..869466ec 100755 --- a/piratebox/piratebox/bin/json_generation.sh +++ b/piratebox/piratebox/bin/json_generation.sh @@ -31,7 +31,7 @@ echo "{ \"piratebox\" : { \"module\" : { " >> $JSON_FILE #------------ upload configuration echo -n " \"upload\" : { \"status\" : $json_droopy_enabled , \"file\" : \"$UPLOAD_MODULE_FILE\" " >> $JSON_FILE #----------- droopy specialities -if [ "$DROOPY_ENABLED" == "yes" ] ; then +if [ "$DROOPY_ENABLED" = "yes" ] ; then echo -n ", " >> $JSON_FILE echo -n " \"upload_style\" : \"droopy\" , " >> $JSON_FILE echo -n " \"droopy_port\" : \"$DROOPY_PORT\", \"droopy_host\" : \"$HOST\" " >> $JSON_FILE diff --git a/piratebox/piratebox/init.d/piratebox b/piratebox/piratebox/init.d/piratebox index e28e8901..b4862dbb 100755 --- a/piratebox/piratebox/init.d/piratebox +++ b/piratebox/piratebox/init.d/piratebox @@ -155,7 +155,7 @@ case "$1" in log_end_msg $? - if [ "$IPV6_ENABLE" == "yes" ] && [ "$IPV6_ADVERT" == "radvd" ] ; then + if [ "$IPV6_ENABLE" = "yes" ] && [ "$IPV6_ADVERT" = "radvd" ] ; then log_daemon_msg "Starting radvd..." start-stop-daemon --start --quiet --exec radvd -- -p $PIDFILE_RADVD -C $CONF_RADVD log_end_msg $? diff --git a/piratebox/piratebox/init.d/piratebox_alt b/piratebox/piratebox/init.d/piratebox_alt index 46883ca4..e2c27b50 100755 --- a/piratebox/piratebox/init.d/piratebox_alt +++ b/piratebox/piratebox/init.d/piratebox_alt @@ -148,7 +148,7 @@ case "$1" in $PIRATEBOX_FOLDER/bin/firewall.sh -s echo $? - if [ "$IPV6_ENABLE" == "yes" ] && [ "$IPV6_ADVERT" == "radvd" ] ; then + if [ "$IPV6_ENABLE" = "yes" ] && [ "$IPV6_ADVERT" = "radvd" ] ; then echo "Starting radvd..." start-stop-daemon -S -q -x radvd -- -p $PIDFILE_RADVD -C $CONF_RADVD echo $? From 3e7ea66fb227407b5eeab3cb08149d8df79388ab Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sun, 30 Oct 2016 14:07:52 +0100 Subject: [PATCH 02/25] forest.py: Change CSS path to content folder & datapath to share --- CHANGELOG | 1 + piratebox/piratebox/bin/install_piratebox.sh | 6 +++--- piratebox/piratebox/src/forest.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 026bc2c3..b00524d7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ CHANGELOG === 1.1.3 === * [Fix] Some shell incompatibilities +* [Fix] forest.py : Cleanup used folders === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink diff --git a/piratebox/piratebox/bin/install_piratebox.sh b/piratebox/piratebox/bin/install_piratebox.sh index df13f264..3ffbb6cc 100755 --- a/piratebox/piratebox/bin/install_piratebox.sh +++ b/piratebox/piratebox/bin/install_piratebox.sh @@ -46,11 +46,11 @@ PIRATEBOX_CONFIG=$1 if [ $2 = 'pyForum' ] ; then cp -v $PIRATEBOX_FOLDER/src/forest.py $WWW_FOLDER/cgi-bin - cp -v $PIRATEBOX_FOLDER/src/forest.css $WWW_FOLDER/ + cp -v $PIRATEBOX_FOLDER/src/forest.css $WWW_FOLDER/content/css mkdir -p $PIRATEBOX_FOLDER/forumspace - chmod a+rw -R $PIRATEBOX_FOLDER/forumspace + chmod a+rw -R $PIRATEBOX_FOLDER/forumspace 2> /dev/null chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/cgi-bin/forest.py - chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/forest.css + chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/content/forest.cssi 2> /dev/null echo "Copied the files. Recheck your PirateBox now. " fi diff --git a/piratebox/piratebox/src/forest.py b/piratebox/piratebox/src/forest.py index e91db3c2..d2c23bf9 100755 --- a/piratebox/piratebox/src/forest.py +++ b/piratebox/piratebox/src/forest.py @@ -64,11 +64,11 @@ # ============================================================================ # Where the threads are stored. This folder must exist. -DATA_PATH = '/opt/piratebox/forumspace/' +DATA_PATH = '/opt/piratebox/share/forumspace/' #Where the forest CGI is located (as a URL). CGI_URL='/cgi-bin/forest.py' # Where the main stylesheet is kept (as a URL). -CSS_PATH = '/forest.css' +CSS_PATH = '/content/css/forest.css' # What is the title of the board? BOARD_TITLE = 'PirateBox Board' # Simple Description of the board, appears at the top of each page From 2bef55bae6aabfa5a7382b674019e780b47b9034 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Thu, 17 Nov 2016 06:54:48 +0100 Subject: [PATCH 03/25] forest.py: Fixing install typo of css --- piratebox/piratebox/bin/install_piratebox.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piratebox/piratebox/bin/install_piratebox.sh b/piratebox/piratebox/bin/install_piratebox.sh index 3ffbb6cc..7a6e9320 100755 --- a/piratebox/piratebox/bin/install_piratebox.sh +++ b/piratebox/piratebox/bin/install_piratebox.sh @@ -50,7 +50,7 @@ if [ $2 = 'pyForum' ] ; then mkdir -p $PIRATEBOX_FOLDER/forumspace chmod a+rw -R $PIRATEBOX_FOLDER/forumspace 2> /dev/null chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/cgi-bin/forest.py - chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/content/forest.cssi 2> /dev/null + chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $WWW_FOLDER/content/forest.css 2> /dev/null echo "Copied the files. Recheck your PirateBox now. " fi From a8137c38bcc0897ff3bf90225c4809e1be2bdf89 Mon Sep 17 00:00:00 2001 From: Diego Jahn Date: Tue, 22 Nov 2016 02:01:13 +0100 Subject: [PATCH 04/25] Fixed localization ID for placeholder message. --- piratebox/piratebox/www_content/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piratebox/piratebox/www_content/index.html b/piratebox/piratebox/www_content/index.html index 5166ee35..1f092796 100644 --- a/piratebox/piratebox/www_content/index.html +++ b/piratebox/piratebox/www_content/index.html @@ -69,7 +69,7 @@

Chat

- +
From ce8e3b8c1fa5358042fa93ba93a4c7de9a47c669 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Wed, 23 Nov 2016 07:04:47 +0100 Subject: [PATCH 05/25] Record new contribution --- AUTHORS | 1 + CHANGELOG | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index 42533729..8bd2fe37 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,6 +24,7 @@ Contributors for modifications: # Mike Weaver # bartschat - RTC RPi feature # casdr + # jdieg0 # ... and all others I might have forgotten. diff --git a/CHANGELOG b/CHANGELOG index b00524d7..8ef04550 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ CHANGELOG === 1.1.3 === * [Fix] Some shell incompatibilities * [Fix] forest.py : Cleanup used folders +* [Fix] Fixed localization ID for placeholder message === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink From 94ac367ea14d9ecdfa0fb3992431e99f5c2fe59c Mon Sep 17 00:00:00 2001 From: nomen Date: Thu, 5 Jan 2017 20:03:45 -0200 Subject: [PATCH 06/25] --added brazilian portuguese translation to the landing page (data.pt-br.properties) --- .../www_content/locales/data.pt-br.properties | 48 +++++++++++++++++++ .../piratebox/www_content/locales/locales.ini | 3 ++ 2 files changed, 51 insertions(+) create mode 100644 piratebox/piratebox/www_content/locales/data.pt-br.properties diff --git a/piratebox/piratebox/www_content/locales/data.pt-br.properties b/piratebox/piratebox/www_content/locales/data.pt-br.properties new file mode 100644 index 00000000..b9e5838d --- /dev/null +++ b/piratebox/piratebox/www_content/locales/data.pt-br.properties @@ -0,0 +1,48 @@ +# Portuguese (Brazilian) strings +# vim: ft=jproperties + +link = link + +#Some words like "link", "chat" and "upload" I chose to keep in English, because they are kind of part of the Brazilian vocabulary and more appropriate in this case ... -- 'Akira + +navbarHome = Página Inicial +navbarForum = Fórum +navbarFiles = Arquivos +navbarAbout = Sobre +logoIMG.alt = PirateBox +logoIMG.title = PirateBox - Compartilhe Livremente + +welcomeWelcome = Bem-vindx + +# In portuguese, we have a lot of words that are flexible to gender. In the majority of the cases, these words are used in the masculine form to refer to all the genders. This pratice makes the language machist, while excluding thos who do not feel represented by this writing of the language. So, some people started to write those words with an "x" at the "end" (instead of the vowel "o" for masculine and "a" for feminine) in the hope to make this people more comfortable and included =D -- 'Akira + +welcomeDescription.innerHTML = Primeiramente, não há nada ilegal ou assustador acontecendo aqui. Este é um lugar social onde você pode conversar e compartilhar arquivos com pessoas do seu entorno de forma anônima! Esta e uma rede off-line, especialmente desenhada e desenvolvida para o compartilhamento de arquivos e serviços de chat. Estar fora do grid computacional é uma precaução para manter sua total anonimidade. Por favor, divirta-se, converse com pessoas e sinta-se livre para compartilhar os arquivos que quiser. + +welcomeThanksButton.value = Obrigadx +sidebarUpload = Ir para o Upload -> +sidebarIframeNotSupported = Seu navegador não suporta o iframes.. Caso você queira fazer o upload de algo siga, siga isto +sidebarBrowseFiles = Navegue pelos Arquivos -> + +diskUsage = Uso do Disco +refreshButton.value = Recarregar +refreshButton.title = O uso do disco pode ser recarregado apenas a cada 5 minutos + +mainChatChat = Chat +mainChatSend.value = Enviar +mainChatName.placeholder = Pseudônimo +mainChatName.value = Anônimx +mainChatMessage.placeholder = Mensagem... +mainChatTextColor = Cor do Texto: +mainShoutboxDefault = Padrão +mainShoutboxBlue = Azul +mainShoutboxGreen = Verde +mainShoutboxOrange = Laranja +mainShoutboxRed = Vermelho + +footerBackToTop = Voltar ao topo +footerAbout = Sobre +footerInspired = Inspirado pelo rádio pirata e pelo movimento da cultura livre, PirateBox é um dispositivo móvel de colaboração e compartilhamento de arquivos auto-contido. PirateBox utiliza software Livre e de Código Aberto (FLOSS, da sigla em inglês) para criar redes moveis de compartilhamento de arquivos em que usuárixs podem compartilhar imagens, vídeo, áudio, documentos e outros conteúdos digitais, de forma anônima. + +footerFilesTopSafety = PirateBox é desenhado com segurança em mente. Nenhum login é requerido e nenhum dado sobre x usuárix é gravado. O sistema é propositalmente nõo conectado à Internet, de forma a prevenir o rastreamento e preservar a privacidade dxs usuárixs. +#In portuguese both words "safe" and "secure" could be translated as "segurança" (more precisely "seguro") in this context. So I had to change the sentence slightly for something similar (in a gross translation from portuguese to english) to "PirateBox is designed with safety and security in mind". +footerLicenceMain = PirateBox é licenciado pela GPLv3. diff --git a/piratebox/piratebox/www_content/locales/locales.ini b/piratebox/piratebox/www_content/locales/locales.ini index 0c445a63..c1366d5f 100644 --- a/piratebox/piratebox/www_content/locales/locales.ini +++ b/piratebox/piratebox/www_content/locales/locales.ini @@ -6,3 +6,6 @@ [fr] @import url(data.fr.properties) + +[pt-br] +@import url(data.pt-br.properties) From 1bc42e858bacf2a7aea30e8c3f4fcdcfb0e84ae8 Mon Sep 17 00:00:00 2001 From: Diego Jahn Date: Mon, 16 Jan 2017 03:23:31 +0100 Subject: [PATCH 07/25] Correct/translate German localisation strings. --- .../www_content/locales/data.de.properties | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/piratebox/piratebox/www_content/locales/data.de.properties b/piratebox/piratebox/www_content/locales/data.de.properties index 6306fa1f..af08f189 100644 --- a/piratebox/piratebox/www_content/locales/data.de.properties +++ b/piratebox/piratebox/www_content/locales/data.de.properties @@ -5,35 +5,35 @@ link = link navbarHome = Home navbarForum = Forum navbarFiles = Dateien -navbarAbout.innerHTML = über +navbarAbout.innerHTML = Über logoIMG.alt = PirateBox logoIMG.title = PirateBox - Share Freely -welcomeWelcome = Wilkommen -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 fuer volle Anonymitaet. Hab Spass, chatte mit Menschen und teile Dateien, die du magst. -welcomeThanksButton.value = Thanks -sidebarUpload = Go to Upload -> -sidebarIframeNotSupported = Your browser does not support iframes.. If you want to upload something, follow this -sidebarBrowseFiles.innerHTML = Stöbere Dateien -> +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. +welcomeThanksButton.value = Alles klar! +sidebarUpload = Upload -> +sidebarIframeNotSupported = Dein Browser unterstützt keine Iframes. Wenn du etwas hochladen möchtest, hier entlang: +sidebarBrowseFiles.innerHTML = Dateien durchstöbern -> -diskUsage = Disk Usage -refreshButton.value = Refresh -refreshButton.title = Disk usage can only be refreshed every 5 minutes +diskUsage = Belegter Speicherplatz +refreshButton.value = Aktualisieren +refreshButton.title = Der belegte Speicherplatz kann nur alle 5 Minuten neu abgefragt werden. mainChatChat = Chat -mainChatSend.value = Send +mainChatSend.value = Senden mainChatName.placeholder = Alias mainChatName.value = Anonymous -mainChatMessage.placeholder = Message... -mainChatTextColor = Text Color: -mainShoutboxDefault = Default -mainShoutboxBlue = Blue -mainShoutboxGreen = Green +mainChatMessage.placeholder = Nachricht... +mainChatTextColor = Textfarbe: +mainShoutboxDefault = Standard +mainShoutboxBlue = Blau +mainShoutboxGreen = Gruen mainShoutboxOrange = Orange -mainShoutboxRed = Red +mainShoutboxRed = Rot -footerBackToTop = Back to top -footerAbout = About -footerInspired = Inspiriert durch Piratensender und der Freien Kultur Bewegung, ist die PirateBox ein in sich abgeschlossenes Geraet zur mobilen Zusammenarbeit und zum Filesharing. Die PirateBox nutzt freie, offene Software (FLOSS) um mobile, drahtlose Filesharing-Netzwerke aufzubauen, wo Nutzer Bilder, Video-, Audio-Dateien, Dokumente und andere digitale Inhalte teilen koennen. -footerFilesTopSafety = Die PirateBox wurde designt um sicher und ungefaehrlich zu sein. Es sind keine Logins/Anmeldungen erforderlich und keine Benutzer-Daten werden geloggt. Um Tracking zu vermeiden und Datenschutz sicherzustellen, ist das System absichtlich nicht mit dem Internet verbunden. +footerBackToTop = Zum Seitenanfang +footerAbout.innerHTML = Über +footerInspired.innerHTML = Inspiriert durch Piratensender und der Freien-Kultur-Bewegung, ist die PirateBox ein in sich abgeschlossenes Gerät zur mobilen Zusammenarbeit und zum Filesharing. Die PirateBox nutzt freie, offene Software (FLOSS), um mobile, drahtlose Filesharing-Netzwerke aufzubauen, wo Nutzer Bilder, Video-, Audio-Dateien, Dokumente und andere digitale Inhalte teilen können. +footerFilesTopSafety.innerHTML = Die PirateBox wurde designt, um sicher und ungefährlich zu sein. Es sind keine Logins/Registrierungen erforderlich und keine Benutzer-Daten werden geloggt. Um Tracking zu vermeiden und Datenschutz sicherzustellen, ist das System absichtlich nicht mit dem Internet verbunden. footerLicenceMain = PirateBox ist lizensiert unter GPLv3. From 29bcb0544ebfaffd221156f107f674c198503d4a Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Mon, 16 Jan 2017 21:13:17 +0100 Subject: [PATCH 08/25] Track new contribution --- AUTHORS | 1 + CHANGELOG | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index 8bd2fe37..a077c0e9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -25,6 +25,7 @@ Contributors for modifications: # bartschat - RTC RPi feature # casdr # jdieg0 + # a-ira # ... and all others I might have forgotten. diff --git a/CHANGELOG b/CHANGELOG index 8ef04550..41c367ce 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG === 1.1.3 === +* [New] Translation bt-pr * [Fix] Some shell incompatibilities * [Fix] forest.py : Cleanup used folders * [Fix] Fixed localization ID for placeholder message From b221bbc0ea86b3f42fc896f161edde7836dfb6cd Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Mon, 16 Jan 2017 21:15:32 +0100 Subject: [PATCH 09/25] Track fix ger language --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 41c367ce..5bdeb0e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ CHANGELOG * [Fix] Some shell incompatibilities * [Fix] forest.py : Cleanup used folders * [Fix] Fixed localization ID for placeholder message +* [Fix] Correct/translate German localisation strings === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink From 9ae84a2a94a2a7efe04e4d3bf988c29f625f8e23 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Mon, 16 Jan 2017 21:46:09 +0100 Subject: [PATCH 10/25] Fix Shellcheck results --- piratebox/piratebox/bin/firewall.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/piratebox/piratebox/bin/firewall.sh b/piratebox/piratebox/bin/firewall.sh index d10c3688..606892e3 100755 --- a/piratebox/piratebox/bin/firewall.sh +++ b/piratebox/piratebox/bin/firewall.sh @@ -42,13 +42,13 @@ if test -z "$run" ; then echo "ERROR: You need to select -s (start) or -k (stop) " help_text fi -if test -z $PIRATEBOX_CONFIG || test -z "$FIREWALL_CONFIG" ; then +if test -z "$PIRATEBOX_CONFIG" || test -z "$FIREWALL_CONFIG" ; then echo "ERROR: one of the config paths is empty, while it should not" help_text fi - . $PIRATEBOX_CONFIG || exit 6 - . $FIREWALL_CONFIG || exit 5 + . "$PIRATEBOX_CONFIG" || exit 6 + . "$FIREWALL_CONFIG" || exit 5 if [ "$run" = "start" ] ; then IPT_FLAG="-A" From ced32586bbeda60f31cf7a3202433e91e399c0de Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Wed, 15 Mar 2017 23:00:15 +0100 Subject: [PATCH 11/25] Fix for issue on RPi3 with multiple wifi cards New configuration file can be used to determine which card should be used for hostap. Fixes #155 --- piratebox/piratebox/rpi/bin/starter.sh | 17 ++++++++- piratebox/piratebox/rpi/bin/wifi_detect.sh | 43 ++++++++++++++++++---- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/piratebox/piratebox/rpi/bin/starter.sh b/piratebox/piratebox/rpi/bin/starter.sh index 61cad4f4..1eb5b5d1 100755 --- a/piratebox/piratebox/rpi/bin/starter.sh +++ b/piratebox/piratebox/rpi/bin/starter.sh @@ -1,3 +1,18 @@ #!/bin/sh # Try to setup WiFi and if it succeeds, start the PirateBox -/bin/sh -c /opt/piratebox/rpi/bin/wifi_detect.sh && /usr/bin/systemctl start piratebox + +## Default +WIFI_DEVICE="wlan0" + +WIFI_CONFIG_PATH="/boot/wifi_card.conf" + +if test -e "${WIFI_CONFIG_PATH}" ; then + echo "Found wifi card config" + WIFI_DEVICE=$( head -n 1 "${WIFI_CONFIG_PATH}" | tr -d '\n' ) +fi + + +if [ "${INTERFACE}" = "${WIFI_DEVICE}" ] ; then + /bin/sh -c /opt/piratebox/rpi/bin/wifi_detect.sh && /usr/bin/systemctl start piratebox +fi +exit 0 diff --git a/piratebox/piratebox/rpi/bin/wifi_detect.sh b/piratebox/piratebox/rpi/bin/wifi_detect.sh index f1dd2a11..6842989e 100755 --- a/piratebox/piratebox/rpi/bin/wifi_detect.sh +++ b/piratebox/piratebox/rpi/bin/wifi_detect.sh @@ -3,29 +3,56 @@ # Install the proper hostapd package and adjust the hostapd configuration # accordingly. +## Default +WIFI_DEVICE="wlan0" + +WIFI_CONFIG_PATH="/boot/wifi_card.conf" + PACKAGE_PATH="/prebuild/hostapd" CONFIG_PATH="/opt/piratebox/conf/hostapd.conf" +## Only use if it is set +if test -e "${WIFI_CONFIG_PATH}" ; then + echo "Found wifi card config" + WIFI_DEVICE=$( head -n 1 "${WIFI_CONFIG_PATH}" | tr -d '\n' ) +fi + +hostap_interface=$( grep -e '^interface' "${CONFIG_PATH}" | sed -e 's|interface=||' ) + +if [ "${hostap_interface}" = "${WIFI_DEVICE}" ] ; then + echo "No change in hostapd.conf for wifi device needed" +else + sed -i -e "s|$hostap_interface|$WIFI_DEVICE|" "${CONFIG_PATH}" +fi + +## Get pyhX device node +CARD_ID=$( cat /sys/class/net/"${WIFI_DEVICE}"/phy80211/index ) + + # Check if we have an nl80211 enabled device with AP mode, then we are done -if iw list | grep > /dev/null "* AP$"; then +if iw phy phy"${CARD_ID}" | grep -q "* AP$"; then echo "Found nl80211 device capable of AP mode..." - yes | pacman -U --needed "${PACKAGE_PATH}/hostapd-2"* > /dev/null + pacman --noconfirm -U --needed "${PACKAGE_PATH}/hostapd-2"* > /dev/null sed -i 's/^#driver=nl80211/driver=nl80211/' "${CONFIG_PATH}" exit 0 fi +#Get driver name +DRIVER_NAME=$( ls -1 /sys/class/net/"${WIFI_DEVICE}"/device/driver/module/drivers/ ) + # Check for r8188eu enabled device -if dmesg | grep > /dev/null "r8188eu:"; then +if echo "$DRIVER_NAME" | grep -q "r8188eu:"; then echo "Found r8188eu enabled device..." - yes | pacman -U --needed "${PACKAGE_PATH}/hostapd-8188eu-"* > /dev/null + pacman --noconfirm -U --needed "${PACKAGE_PATH}/hostapd-8188eu-"* > /dev/null sed -i 's/^driver=nl80211/#driver=nl80211/' "${CONFIG_PATH}" exit 0 fi + # Check for rtl8192cu enabled device -if dmesg | grep > /dev/null "rtl8192cu"; then +if echo "$DRIVER_NAME" | grep -q "rtl8192cu"; then echo "Found rtl8192cu enabled device..." - yes | pacman -U --needed "${PACKAGE_PATH}/hostapd-8192cu-"* > /dev/null + pacman --noconfirm -U --needed "${PACKAGE_PATH}/hostapd-8192cu-"* > /dev/null sed -i 's/^driver=nl80211/#driver=nl80211/' "${CONFIG_PATH}" exit 0 fi @@ -35,8 +62,8 @@ echo "Could not find an AP enabled WiFi card..." # Try to connect to Wifi if wpa_supplicant.conf is available. if [ -f /boot/wpa_supplicant.conf ]; then echo "Found wpa_supplicant conf, trying to connect..." - wpa_supplicant -iwlan0 -c /boot/wpa_supplicant.conf -B -D wext - dhcpcd wlan0 + wpa_supplicant -i"${WIFI_DEVICE}" -c /boot/wpa_supplicant.conf -B -D wext + dhcpcd "${WIFI_DEVICE}" fi exit 1 From 38e740e3747dc17055c439a11251113f18ed8bdc Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Wed, 15 Mar 2017 23:43:35 +0100 Subject: [PATCH 12/25] hostapd.conf: More comment to enable n wifi mode --- CHANGELOG | 1 + piratebox/piratebox/conf/hostapd.conf | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 5bdeb0e8..1709db2e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ CHANGELOG * [Fix] forest.py : Cleanup used folders * [Fix] Fixed localization ID for placeholder message * [Fix] Correct/translate German localisation strings +* [Fix] Adjust hostapd.conf with comments & addtional parameter for n-mode wifi === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink diff --git a/piratebox/piratebox/conf/hostapd.conf b/piratebox/piratebox/conf/hostapd.conf index 7e930962..2e2b8c25 100644 --- a/piratebox/piratebox/conf/hostapd.conf +++ b/piratebox/piratebox/conf/hostapd.conf @@ -4,7 +4,10 @@ ssid=PirateBox - Share Freely hw_mode=g channel=1 #auth_algs=1 + +# Remove # to enable n wifi mode #ieee80211n=1 +#wmm_enabled=1 # Put a # in front of the following line to allow # direct client 2 client communication From 701b884703a42c783b12e55bdee535611f8f9c47 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Fri, 17 Mar 2017 07:34:32 +0100 Subject: [PATCH 13/25] wifi_detect.sh: Bugfixes and adjust piratebox configuration --- piratebox/piratebox/rpi/bin/wifi_detect.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/piratebox/piratebox/rpi/bin/wifi_detect.sh b/piratebox/piratebox/rpi/bin/wifi_detect.sh index 6842989e..a8c4da3a 100755 --- a/piratebox/piratebox/rpi/bin/wifi_detect.sh +++ b/piratebox/piratebox/rpi/bin/wifi_detect.sh @@ -10,6 +10,7 @@ WIFI_CONFIG_PATH="/boot/wifi_card.conf" PACKAGE_PATH="/prebuild/hostapd" CONFIG_PATH="/opt/piratebox/conf/hostapd.conf" +PIRATEBOX_CONFIG_PATH="/opt/piratebox/conf/piratebox.conf" ## Only use if it is set if test -e "${WIFI_CONFIG_PATH}" ; then @@ -18,19 +19,24 @@ if test -e "${WIFI_CONFIG_PATH}" ; then fi hostap_interface=$( grep -e '^interface' "${CONFIG_PATH}" | sed -e 's|interface=||' ) +piratebox_interface=$( grep -e '^INTERFACE' "${PIRATEBOX_CONFIG_PATH}" | \ + sed -e 's|INTERFACE=||' -e 's|"||g' ) +dnsmasq_interface=$( grep -e '^DNSMASQ_INTERFACE' "${PIRATEBOX_CONFIG_PATH}" | \ + sed -e 's|DNSMASQ_INTERFACE=||' -e 's|"||g' ) + +sed -i -e "s|interface=$hostap_interface|interface=$WIFI_DEVICE|" "${CONFIG_PATH}" +sed -i -e "s|INTERFACE=\"$piratebox_interface\"|INTERFACE=\"$WIFI_DEVICE\"|" \ + -e "s|DNSMASQ_INTERFACE=\"$dnsmasq_interface\"|DNSMASQ_INTERFACE=\"$WIFI_DEVICE\"|" \ + "${PIRATEBOX_CONFIG_PATH}" + -if [ "${hostap_interface}" = "${WIFI_DEVICE}" ] ; then - echo "No change in hostapd.conf for wifi device needed" -else - sed -i -e "s|$hostap_interface|$WIFI_DEVICE|" "${CONFIG_PATH}" -fi ## Get pyhX device node CARD_ID=$( cat /sys/class/net/"${WIFI_DEVICE}"/phy80211/index ) # Check if we have an nl80211 enabled device with AP mode, then we are done -if iw phy phy"${CARD_ID}" | grep -q "* AP$"; then +if iw phy phy"${CARD_ID}" info | grep -q "* AP$"; then echo "Found nl80211 device capable of AP mode..." pacman --noconfirm -U --needed "${PACKAGE_PATH}/hostapd-2"* > /dev/null sed -i 's/^#driver=nl80211/driver=nl80211/' "${CONFIG_PATH}" From 86cd3719ad639c205d87c6b7af93da9909711ba8 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Fri, 17 Mar 2017 07:38:11 +0100 Subject: [PATCH 14/25] wifi_detect: only change piratebox.conf if it is a wifi device --- piratebox/piratebox/rpi/bin/wifi_detect.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/piratebox/piratebox/rpi/bin/wifi_detect.sh b/piratebox/piratebox/rpi/bin/wifi_detect.sh index a8c4da3a..3a5f42bf 100755 --- a/piratebox/piratebox/rpi/bin/wifi_detect.sh +++ b/piratebox/piratebox/rpi/bin/wifi_detect.sh @@ -25,9 +25,16 @@ dnsmasq_interface=$( grep -e '^DNSMASQ_INTERFACE' "${PIRATEBOX_CONFIG_PATH}" | \ sed -e 's|DNSMASQ_INTERFACE=||' -e 's|"||g' ) sed -i -e "s|interface=$hostap_interface|interface=$WIFI_DEVICE|" "${CONFIG_PATH}" -sed -i -e "s|INTERFACE=\"$piratebox_interface\"|INTERFACE=\"$WIFI_DEVICE\"|" \ - -e "s|DNSMASQ_INTERFACE=\"$dnsmasq_interface\"|DNSMASQ_INTERFACE=\"$WIFI_DEVICE\"|" \ - "${PIRATEBOX_CONFIG_PATH}" + +#Only change piratebox interface if it is a wifi interface +if echo "$piratebox_interface" | grep -q "wlan" ; then + sed -i -e "s|INTERFACE=\"$piratebox_interface\"|INTERFACE=\"$WIFI_DEVICE\"|" \ + "${PIRATEBOX_CONFIG_PATH}" +fi +if echo "$dnsmasq_interface" | grep -q "wlan" ; then + sed -i -e "s|DNSMASQ_INTERFACE=\"$dnsmasq_interface\"|DNSMASQ_INTERFACE=\"$WIFI_DEVICE\"|" \ + "${PIRATEBOX_CONFIG_PATH}" +fi From b6ec9f041f8991fe8a64290f548c7e1cdcb84ec9 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Fri, 17 Mar 2017 22:39:32 +0100 Subject: [PATCH 15/25] Feature: Add scripts for on the fly client mode Closes: #171 --- .../piratebox/rpi/bin/do_switch_client.sh | 14 ++++++++++ piratebox/piratebox/rpi/bin/run_client.sh | 27 +++++++++++++++++++ .../piratebox/rpi/bin/switch_to_client.sh | 6 +++++ piratebox/piratebox/rpi/bin/wifi_detect.sh | 6 ++--- 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100755 piratebox/piratebox/rpi/bin/do_switch_client.sh create mode 100755 piratebox/piratebox/rpi/bin/run_client.sh create mode 100755 piratebox/piratebox/rpi/bin/switch_to_client.sh diff --git a/piratebox/piratebox/rpi/bin/do_switch_client.sh b/piratebox/piratebox/rpi/bin/do_switch_client.sh new file mode 100755 index 00000000..92347787 --- /dev/null +++ b/piratebox/piratebox/rpi/bin/do_switch_client.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Wrapper script for the steps to enable wifi client + +systemctl stop piratebox +if /opt/piratebox/rpi/run_client.sh ; then + echo "Started Wifi client sucessfully!" + exit 0 +else + echo "Error while starting wifi client, restarting piratebox" + systemctl start piratebox + exit 1 +fi +exit 1 diff --git a/piratebox/piratebox/rpi/bin/run_client.sh b/piratebox/piratebox/rpi/bin/run_client.sh new file mode 100755 index 00000000..11e69abb --- /dev/null +++ b/piratebox/piratebox/rpi/bin/run_client.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Runs with wpa_supplicant & wifi device from boot folder. + +## Default +WIFI_DEVICE="wlan0" + +WIFI_CONFIG_PATH="/boot/wifi_card.conf" +WPA_SUPPLICANT="/boot/wpa_supplicant.conf" + +# Try to get wifi device +if test -e "${WIFI_CONFIG_PATH}" ; then + echo "Found wifi card config" + WIFI_DEVICE=$( head -n 1 "${WIFI_CONFIG_PATH}" | tr -d '\n' ) +fi + +# Try to connect to Wifi if wpa_supplicant.conf is available. +if [ -f "${WPA_SUPPLICANT}" ]; then + echo "Found wpa_supplicant conf, trying to connect..." + wpa_supplicant -i"${WIFI_DEVICE}" -c "${WPA_SUPPLICANT}" -B -D wext + dhcpcd "${WIFI_DEVICE}" + exit 0 +else + echo "Wifi configuration not found" + exit 1 +fi +exit 1 diff --git a/piratebox/piratebox/rpi/bin/switch_to_client.sh b/piratebox/piratebox/rpi/bin/switch_to_client.sh new file mode 100755 index 00000000..a2bee92d --- /dev/null +++ b/piratebox/piratebox/rpi/bin/switch_to_client.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# User friendly way to switch to client +# Adds "nohup" option... + +nohup /opt/piratebox/rpi/bin/do_switch_client.sh diff --git a/piratebox/piratebox/rpi/bin/wifi_detect.sh b/piratebox/piratebox/rpi/bin/wifi_detect.sh index 3a5f42bf..68e3c5a2 100755 --- a/piratebox/piratebox/rpi/bin/wifi_detect.sh +++ b/piratebox/piratebox/rpi/bin/wifi_detect.sh @@ -74,9 +74,9 @@ echo "Could not find an AP enabled WiFi card..." # Try to connect to Wifi if wpa_supplicant.conf is available. if [ -f /boot/wpa_supplicant.conf ]; then - echo "Found wpa_supplicant conf, trying to connect..." - wpa_supplicant -i"${WIFI_DEVICE}" -c /boot/wpa_supplicant.conf -B -D wext - dhcpcd "${WIFI_DEVICE}" + /opt/piratebox/rpi/bin/run_client.sh + exit 1 + # Exit =! 0 will result in not starting piratebox service fi exit 1 From a0b0685961bf088c1c8a6ef195612785f1288730 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 11:32:50 +0100 Subject: [PATCH 16/25] hostapd.conf: More Comments in hostapd for WPA mode --- CHANGELOG | 2 ++ piratebox/piratebox/conf/hostapd.conf | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 1709db2e..07fa2fd5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,11 +2,13 @@ CHANGELOG === 1.1.3 === * [New] Translation bt-pr +* [New] [RPi] Helper scripts to jump to wifi client mode * [Fix] Some shell incompatibilities * [Fix] forest.py : Cleanup used folders * [Fix] Fixed localization ID for placeholder message * [Fix] Correct/translate German localisation strings * [Fix] Adjust hostapd.conf with comments & addtional parameter for n-mode wifi +* [Fix] Some help about setting up WPA2 mode for AP in hostapd.conf === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink diff --git a/piratebox/piratebox/conf/hostapd.conf b/piratebox/piratebox/conf/hostapd.conf index 2e2b8c25..b6d8f9d8 100644 --- a/piratebox/piratebox/conf/hostapd.conf +++ b/piratebox/piratebox/conf/hostapd.conf @@ -1,14 +1,23 @@ interface=wlan0 driver=nl80211 ssid=PirateBox - Share Freely -hw_mode=g + channel=1 #auth_algs=1 # Remove # to enable n wifi mode #ieee80211n=1 #wmm_enabled=1 +#ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40] +hw_mode=g # Put a # in front of the following line to allow # direct client 2 client communication ap_isolate=1 + +# Uncomment the following lines to enable WPA +#wpa=2 +#wpa_key_mgmt=WPA-PSK +#wpa_pairwise=TKIP CCMP +#rsn_pairwise=CCMP +#wpa_passphrase=Somepassphrase From 9cd83012aea03c79d39ca77e7321d858088f8326 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 12:33:45 +0100 Subject: [PATCH 17/25] usb_share.sh: Force disk usage update --- piratebox/piratebox/rpi/bin/usb_share.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/piratebox/piratebox/rpi/bin/usb_share.sh b/piratebox/piratebox/rpi/bin/usb_share.sh index 790abf21..bdcf5244 100755 --- a/piratebox/piratebox/rpi/bin/usb_share.sh +++ b/piratebox/piratebox/rpi/bin/usb_share.sh @@ -39,4 +39,8 @@ else cat "/etc/fstab" fi +# Force update diskwirte +touch -t 197001010101 /opt/piratebox/www/diskusage.html +wget http://127.0.0.1/cgi-bin/diskwrite.py -q -O - + exit 0 From abc530b7f17dbc9d465cab3dc84e1857231aeca5 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 17:24:44 +0100 Subject: [PATCH 18/25] lighttpd.conf: Reduce cache to a minimum - Reduces issues with shoutbox refresh - Solves issue #170 , which is a cache issue - Avoids cache poisening --- piratebox/piratebox/conf/lighttpd/lighttpd.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/piratebox/piratebox/conf/lighttpd/lighttpd.conf b/piratebox/piratebox/conf/lighttpd/lighttpd.conf index 5cbb1c9a..dfac75bc 100644 --- a/piratebox/piratebox/conf/lighttpd/lighttpd.conf +++ b/piratebox/piratebox/conf/lighttpd/lighttpd.conf @@ -95,6 +95,7 @@ $HTTP["url"] =~ "^/board/" { #------------------------------------- +setenv.add-response-header += ( "Cache-Control" => "max-age=60, must-revalidate, no-store, no-cache, public" ) # 404 Error Page with redirect # From ce80afbe4e6b10f9d5d68dd790702ffe7c3aaac0 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 17:28:08 +0100 Subject: [PATCH 19/25] CHANGELOG: Add missing entries for 1.1.3 --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 07fa2fd5..ecd4d364 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,12 +3,14 @@ CHANGELOG === 1.1.3 === * [New] Translation bt-pr * [New] [RPi] Helper scripts to jump to wifi client mode +* [New] [RPi] Helper script to use SDCard without reboot * [Fix] Some shell incompatibilities * [Fix] forest.py : Cleanup used folders * [Fix] Fixed localization ID for placeholder message * [Fix] Correct/translate German localisation strings * [Fix] Adjust hostapd.conf with comments & addtional parameter for n-mode wifi * [Fix] Some help about setting up WPA2 mode for AP in hostapd.conf +* [Fix] Reduce browser cache to a minimum, which solves issues with shoutbox and diskusage === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink From 5fd29f4276318e3facb6d542ca520a6eaf4f43b5 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 17:28:27 +0100 Subject: [PATCH 20/25] Introduced SDCard helper for RPi --- piratebox/piratebox/rpi/bin/sdcard_share.sh | 103 ++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100755 piratebox/piratebox/rpi/bin/sdcard_share.sh diff --git a/piratebox/piratebox/rpi/bin/sdcard_share.sh b/piratebox/piratebox/rpi/bin/sdcard_share.sh new file mode 100755 index 00000000..92d18742 --- /dev/null +++ b/piratebox/piratebox/rpi/bin/sdcard_share.sh @@ -0,0 +1,103 @@ +#/bin/bash + +# This script enables the SDCard as ext4 to be used as storage +# it also activates some spare for swap + +MOUNTPOINT="/mnt/sdshare" +FS="ext4" + + +SDCARD="/dev/mmcblk0" + +if test -e "$SDCARD"p3 ; then + echo "ERROR: SWAP already exists" + exit 1 +fi + +if test -e "$SDCARD"p4 ; then + echo "ERROR: Data partition already exists" + exit 1 +fi + +echo "Creating partitions.." +fdisk "$SDCARD" <> /etc/fstab + +echo "Creating data partition" +mkfs.ext4 -F "$SDCARD"p4 +if [ $? -ne 0 ] ; then + echo "Error formating data" + exit 1 +fi + +DATA_UUID=$( blkid | grep "${SDCARD}p4.*TYPE=\"ext4\"" | egrep -o " UUID=\"([a-zA-Z0-9-])*\"" | sed 's/ //g' ) +if grep -q "${DATA_UUID}" /etc/fstab ; then + echo "Error: data is already configured in fstab" + exit 1 +fi + +echo "${DATA_UUID} ${MOUNTPOINT} ext4 defaults,noatime,nodiratime,data=writeback 0 0 ">> /etc/fstab + +mkdir -p "${MOUNTPOINT}" +mount "${MOUNTPOINT}" + +if [ $? -ne 0 ] ; then + echo "ERROR mounting data partion" + exit 1 +fi + +echo "## Moving files..." +mv /opt/piratebox/share "${MOUNTPOINT}/share" > /dev/null 2>&1 +ln -s "${MOUNTPOINT}/share" /opt/piratebox/share > /dev/null + + +# Force update diskwirte +touch -t 197001010101 /opt/piratebox/www/diskusage.html +wget http://127.0.0.1/cgi-bin/diskwrite.py -q -O - + +exit 0 + From bc14bd6cb90fbc9ccbc190016b51e0b625da69a9 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 17:33:05 +0100 Subject: [PATCH 21/25] RPI-MOTD: Version update --- piratebox/piratebox/rpi/motd.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/piratebox/piratebox/rpi/motd.txt b/piratebox/piratebox/rpi/motd.txt index be918fc7..626df556 100644 --- a/piratebox/piratebox/rpi/motd.txt +++ b/piratebox/piratebox/rpi/motd.txt @@ -5,8 +5,8 @@ ____________________.__ __ __________ |____|_ /|____| |__||__| (____ /__| \___ >______ /\____/__/\_ \ \/ \/ \/ \/ \/ -Website: http://piratebox.cc PirateBox Version: 1.1.1 -Forum: http://forum.piratebox.cc RPi Image Version: 1.1.1-1 +Website: http://piratebox.cc PirateBox Version: 1.1.3 +Forum: http://forum.piratebox.cc RPi Image Version: 1.1.3-1 IRC: #piratebox irc.freenode.net Be open -- Share freely! First Steps After Flashing @@ -23,8 +23,9 @@ First Steps After Flashing > sudo systemctl enable timesave 3. Enable the Kareha Image and Discussion Board > sudo /opt/piratebox/bin/board-autoconf.sh -4. Enable USB thumb drive share - > sudo /opt/piratebox/rpi/bin/usb_share.sh +4. Enable USB thumb drive share OR extend SDCard + USB: > sudo /opt/piratebox/rpi/bin/usb_share.sh + SDCard: > sudo /opt/piratebox/rpi/bin/sdcard_share.sh 5. Enable UPnP Media Server > sudo cp /etc/minidlna.conf /etc/minidlna.conf.bkp > sudo cp /opt/piratebox/src/linux.example.minidlna.conf /etc/minidlna.conf From 33a8104ba71ee3489e74ca99bbd00d1331af1bf6 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 17:34:34 +0100 Subject: [PATCH 22/25] Version flag 1.1.3-beta --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0e20e37b..06a35e3c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = piratebox-ws -VERSION = 1.1.2 +VERSION = 1.1.3-beta ARCH = all PB_FOLDER=piratebox PB_SRC_FOLDER=$(PB_FOLDER)/$(PB_FOLDER) From a21cb09cff7abad3085c02755e34762d91cdc345 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 19:07:16 +0100 Subject: [PATCH 23/25] CHANGELOG: note down RPi Adjustments --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index ecd4d364..33fff942 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ CHANGELOG * [New] Translation bt-pr * [New] [RPi] Helper scripts to jump to wifi client mode * [New] [RPi] Helper script to use SDCard without reboot +* [New] [RPi] Image adjustments to save SDCard for to many writes * [Fix] Some shell incompatibilities * [Fix] forest.py : Cleanup used folders * [Fix] Fixed localization ID for placeholder message From e62957ab2a5ee7413d4d08ad1d1367ead0329a2d Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sat, 18 Mar 2017 21:52:02 +0100 Subject: [PATCH 24/25] Switch to version 1.1.3 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 06a35e3c..6282dcb3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = piratebox-ws -VERSION = 1.1.3-beta +VERSION = 1.1.3 ARCH = all PB_FOLDER=piratebox PB_SRC_FOLDER=$(PB_FOLDER)/$(PB_FOLDER) From 7602d1f7d7dbf1a544a4495208c392f8400c8ce1 Mon Sep 17 00:00:00 2001 From: Matthias Strubel Date: Sun, 19 Mar 2017 09:54:21 +0100 Subject: [PATCH 25/25] js/script.js : Add additional disk usage refresh. In the current config, the disk usage is only refreshed during PirateBox start or via Button. With that adjustment we create a bit more load, but the usage is refreshed better. --- CHANGELOG | 1 + piratebox/piratebox/www_content/js/scripts.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 33fff942..087b728a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,7 @@ CHANGELOG * [Fix] Adjust hostapd.conf with comments & addtional parameter for n-mode wifi * [Fix] Some help about setting up WPA2 mode for AP in hostapd.conf * [Fix] Reduce browser cache to a minimum, which solves issues with shoutbox and diskusage +* [Fix] Trigger async disk usage refresh during page load === 1.1.2 === * [Fix] Upgrade 1.1.x - 1.1.x does not create content symlink diff --git a/piratebox/piratebox/www_content/js/scripts.js b/piratebox/piratebox/www_content/js/scripts.js index 22fcee36..cf2e8290 100755 --- a/piratebox/piratebox/www_content/js/scripts.js +++ b/piratebox/piratebox/www_content/js/scripts.js @@ -56,6 +56,7 @@ $(document).ready(function() { } }); + post_diskusage(); // smooth scrolling for internal links function filterPath(string) {