diff --git a/doc/EN/app_pihole.org b/doc/EN/app_pihole.org index 24d79a09..24bf68c9 100644 --- a/doc/EN/app_pihole.org +++ b/doc/EN/app_pihole.org @@ -32,21 +32,33 @@ When that's done select *About this system* from the control panel and see the I * On each client system within your local network +Make sure that you add the static IP address for the server to */etc/hosts*. + #+begin_src bash +STATIC_IP=[your server static IP] +sudo echo "$STATIC_IP [your domain name]" >> /etc/hosts +#+end_src + +On Arch/Parabola: + +#+begin_src bash +sudo pacman -S openresolv +sudo sed -i "s|#name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf +sudo sed -i "s|name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf sudo chattr -i /etc/resolv.conf -sudo nano /etc/resolv.conf +sudo resolvconf -u #+end_src -Comment out any existing entries with a # character and add: +Or on a Debian based system: #+begin_src bash -nameserver [IPv4 address from the About screen] -#+end_src - -Normally /resolv.conf/ will be overwritten every time your reboot, but you can prevent this with: - -#+begin_src bash -sudo chattr +i /etc/resolv.conf +sudo apt-get install resolvconf +echo 'domain localdomain' > /tmp/resolvconf +echo 'search localdomain' >> /tmp/resolvconf +echo "nameserver $STATIC_IP" >> /tmp/resolvconf +sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head +sudo chattr -i /etc/resolv.conf +sudo resolvconf -u #+end_src * On your internet router diff --git a/src/freedombone-app-cryptpad b/src/freedombone-app-cryptpad index 44722da7..7b3e6712 100755 --- a/src/freedombone-app-cryptpad +++ b/src/freedombone-app-cryptpad @@ -37,7 +37,7 @@ SHOW_ICANN_ADDRESS_ON_ABOUT=0 CRYPTPAD_ONION_PORT=8119 CRYPTPAD_PORT=9003 CRYPTPAD_REPO="https://github.com/xwiki-labs/cryptpad" -CRYPTPAD_COMMIT='0b69973c179efc6f770a1127f07f67de3d6724d1' +CRYPTPAD_COMMIT='52d344c3d1404d75d2bf4ae8845e5c024e85ec7f' CRYPTPAD_DIR=/etc/cryptpad cryptpad_variables=(ONION_ONLY) @@ -283,6 +283,26 @@ function install_cryptpad_main { echo ' try_files $uri =404;' >> $cryptpad_nginx_site echo ' }' >> $cryptpad_nginx_site echo '' >> $cryptpad_nginx_site + echo ' location ^~ /login/ {' >> $cryptpad_nginx_site + echo ' try_files $uri =404;' >> $cryptpad_nginx_site + echo ' }' >> $cryptpad_nginx_site + echo '' >> $cryptpad_nginx_site + echo ' location ^~ /about.html {' >> $cryptpad_nginx_site + echo ' try_files $uri =404;' >> $cryptpad_nginx_site + echo ' }' >> $cryptpad_nginx_site + echo '' >> $cryptpad_nginx_site + echo ' location ^~ /contact.html {' >> $cryptpad_nginx_site + echo ' try_files $uri =404;' >> $cryptpad_nginx_site + echo ' }' >> $cryptpad_nginx_site + echo '' >> $cryptpad_nginx_site + echo ' location ^~ /contact.html {' >> $cryptpad_nginx_site + echo ' try_files $uri =404;' >> $cryptpad_nginx_site + echo ' }' >> $cryptpad_nginx_site + echo '' >> $cryptpad_nginx_site + echo ' location ^~ /what-is-cryptpad.html {' >> $cryptpad_nginx_site + echo ' try_files $uri =404;' >> $cryptpad_nginx_site + echo ' }' >> $cryptpad_nginx_site + echo '' >> $cryptpad_nginx_site echo ' location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media)$ {' >> $cryptpad_nginx_site echo ' rewrite ^(.*)$ $1/ redirect;' >> $cryptpad_nginx_site echo ' }' >> $cryptpad_nginx_site diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index 46c0a8fd..8c44a2da 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -34,6 +34,7 @@ VARIANTS="full full-vim writer" IN_DEFAULT_INSTALL=0 SHOW_ON_ABOUT=1 +GHOST_VERSION=1.6.2 GHOST_DOMAIN_NAME= GHOST_CODE= GHOST_ONION_PORT=8104 @@ -53,6 +54,9 @@ function ghost_bust { kill_pid=$(ps aux | grep "ghost" | awk -F ' ' '{print $2}' | head -n 1) kill -9 $kill_pid + + kill_pid=$(ps aux | grep "ghost" | awk -F ' ' '{print $2}' | head -n 1) + kill -9 $kill_pid } function logging_on_ghost { @@ -188,6 +192,11 @@ function reconfigure_ghost { } function upgrade_ghost { + CURR_GHOST_VERSION=$(get_completion_param "ghost version") + if [[ "${CURR_GHOST_VERSION}" == "${GHOST_VERSION}" ]]; then + return + fi + read_config_param GHOST_DOMAIN_NAME if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then @@ -195,6 +204,7 @@ function upgrade_ghost { fi systemctl stop ghost + ghost_bust cd /var/www/$GHOST_DOMAIN_NAME/htdocs @@ -209,6 +219,7 @@ function upgrade_ghost { chown -R root:root /usr/local/lib chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs systemctl restart ghost + sed -i "s|ghost version.*|ghost version:${GHOST_VERSION}|g" ${COMPLETION_FILE} } function backup_local_ghost { diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index 7643bfc9..de77136d 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -37,7 +37,7 @@ GNUSOCIAL_DOMAIN_NAME= GNUSOCIAL_CODE= GNUSOCIAL_ONION_PORT=8087 GNUSOCIAL_REPO="https://git.gnu.io/gnu/gnu-social.git" -GNUSOCIAL_COMMIT='05a9c11c476b384e5ef3f3cc83b66406fcf7a378' +GNUSOCIAL_COMMIT='d61375cb7fd9e3ac2dbba2b22d0d6461fb753892' GNUSOCIAL_ADMIN_PASSWORD= GNUSOCIAL_BACKGROUND_IMAGE_URL= diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 97aa4c6f..fac768f7 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -312,18 +312,16 @@ function remove_user_matrix { function add_user_matrix { new_username="$1" new_user_password="$2" - is_admin_user='-a' - if [[ "$new_username" != "$MY_USERNAME" ]]; then - is_admin_user='' - fi + read_config_param MY_USERNAME + read_config_param MATRIX_DOMAIN_NAME ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password" - if [[ $ONION_ONLY == 'no' ]]; then - retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user https://${MATRIX_DOMAIN_NAME}) + if [[ "$new_username" != "$MY_USERNAME" ]]; then + echo 'no' | register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" http://localhost:${MATRIX_PORT} else - retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user http://${MATRIX_DOMAIN_NAME}) + echo 'yes' | register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a http://localhost:${MATRIX_PORT} fi echo "0" } diff --git a/src/freedombone-app-pihole b/src/freedombone-app-pihole index 59923bf2..7b9a8c6b 100755 --- a/src/freedombone-app-pihole +++ b/src/freedombone-app-pihole @@ -47,7 +47,7 @@ PIHOLE_BLACKLIST=$piholeDir/blacklist.txt PIHOLE_WHITELIST=$piholeDir/whitelist.txt PIHOLE_REPO="https://github.com/pi-hole/pi-hole" -PIHOLE_COMMIT='bef0a2fef08b39780610b8885407b855edd3ba49' +PIHOLE_COMMIT='2ceeac41fe8e493f9040b54a7c82f1183ecf5566' pihole_variables=(ONION_ONLY PIHOLE_IFACE diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index 758c3129..7885ff08 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -33,7 +33,7 @@ QVITTER_THEME_REPO="https://git.postactiv.com/bob/Qvitter" QVITTER_THEME_COMMIT='b5791cf935a6391c492cefa1ffa50cc3cea44c12' PLEROMA_REPO="https://gitgud.io/lambadalambda/pleroma-fe" -PLEROMA_COMMIT='7d59051fc5e93585d8d9858ac989d9ebf7aa3cf9' +PLEROMA_COMMIT='cbe652f2d94d81fa54a37378b7ff014c4391ca5e' ARMADILLO_REPO="https://git.postactiv.com/maiya/Armadillo" ARMADILLO_COMMIT='ec3938a678f373156c4cbf37926c9a5ab68222c4' @@ -409,6 +409,7 @@ function install_pleroma_front_end { npm install -g eslint-plugin-promise@3.5.0 npm install -g moment@2.18.1 npm install -g node-sass@4.5.2 + npm install -g whatwg-fetch@2.0.3 yarn if [ -f $INSTALL_DIR/pleroma/dist/index.html ]; then rm -rf $INSTALL_DIR/pleroma/dist/* @@ -452,6 +453,7 @@ function upgrade_pleroma { if [ -d $INSTALL_DIR/pleroma ]; then set_repo_commit $INSTALL_DIR/pleroma "${app_name} pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO cd $INSTALL_DIR/pleroma + yarn npm run build if [ ! -d $INSTALL_DIR/pleroma/dist ]; then echo 'Unable to build pleroma' diff --git a/website/EN/app_pihole.html b/website/EN/app_pihole.html index 148c696e..65a57a41 100644 --- a/website/EN/app_pihole.html +++ b/website/EN/app_pihole.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +Ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually 192.168.1.1 or 192.168.1.254.
@@ -276,38 +277,52 @@ When that's done select About this system from the control panel and seesudo chattr -i /etc/resolv.conf -sudo nano /etc/resolv.conf --
-Comment out any existing entries with a # character and add: +Make sure that you add the static IP address for the server to /etc/hosts.
nameserver [IPv4 address from the About screen] -+
STATIC_IP=[your server static IP]
+sudo echo "$STATIC_IP [your domain name]" >> /etc/hosts
+
-Normally resolv.conf will be overwritten every time your reboot, but you can prevent this with: +On Arch/Parabola:
sudo chattr +i /etc/resolv.conf -+
sudo pacman -S openresolv
+sudo sed -i "s|#name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
+sudo sed -i "s|name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
+sudo chattr -i /etc/resolv.conf
+sudo resolvconf -u
+
++Or on a Debian based system: +
+ +sudo apt-get install resolvconf
+echo 'domain localdomain' > /tmp/resolvconf
+echo 'search localdomain' >> /tmp/resolvconf
+echo "nameserver $STATIC_IP" >> /tmp/resolvconf
+sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head
+sudo chattr -i /etc/resolv.conf
+sudo resolvconf -u
+
If you can access the settings on your local internet router then this is the simplest way to provide ad blocking for all devices which connect to it. Unfortunately some router models don't let you edit the DNS settings and if that's the case you might want to consider getting a different router.
@@ -317,9 +332,9 @@ Edit the DNS settings and add the IPv4 address which you got from the control paOn a router running LibreCMC from the Network menu select DHCP and DNS. Enter the static IP address of your Freedombone system within DNS Forwardings, then at the bottom of the page click on Save & Apply. Any devices which connect to your router will now have ad blocking.
@@ -327,9 +342,9 @@ On a router running LibreCMC from the Network menu select DHCP and DNSYou can configure the block lists which the system uses by going to the administrator control panel, selecting App Settings then choosing pihole. You can also add any extra domain names to the whitelist if they're being wrongly blocked or to the blacklist if they're not blocked by the current lists.