diff --git a/README.md b/README.md index 9a88384e..85a890e9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Check out the [list of available apps](https://freedombone.net/apps.html) and [F Disk images which can be cloned straight to USB or microSD drives are [available here](https://freedombone.net/downloads/v31). -If you find bugs, or want to add a new app to this system see the [Developers Guide](https://freedombone.net/devguide.html) and [Code of Conduct](https://freedombone.net/codeofconduct.html). There is a Matrix chat room available at *#fbone:matrix.freedombone.net*. +If you find bugs, or want to add a new app to this system see the [Developers Guide](https://freedombone.net/devguide.html) and [Code of Conduct](https://freedombone.net/codeofconduct.html). There is a Matrix chat room available at *#fbone:matrix.freedombone.net* and an XMPP channel at *support@chat.freedombone.net*. If you like this project and want to support continued development then [here's what to do](https://freedombone.net/support.html). diff --git a/doc/EN/index.org b/doc/EN/index.org index 7cff5d65..0254c70e 100644 --- a/doc/EN/index.org +++ b/doc/EN/index.org @@ -21,7 +21,7 @@ Check out the [[./apps.html][list of available apps]] and [[./faq.html][Frequent Disk images which can be cloned straight to USB or microSD drives are [[./downloads/v31][available here]]. -If you find bugs, or want to add a new app to this system see the [[./devguide.html][Developers Guide]] and [[./codeofconduct.html][Code of Conduct]]. There is a Matrix chat room available at *#fbone:matrix.freedombone.net*. +If you find bugs, or want to add a new app to this system see the [[./devguide.html][Developers Guide]] and [[./codeofconduct.html][Code of Conduct]]. There is a Matrix chat room available at *#fbone:matrix.freedombone.net* and an XMPP channel at *support@chat.freedombone.net*. If you like this project and want to support continued development then [[./support.html][here's what to do]]. diff --git a/doc/EN/support.org b/doc/EN/support.org index 0e457446..0aa8fa74 100644 --- a/doc/EN/support.org +++ b/doc/EN/support.org @@ -21,7 +21,7 @@ This site can also be accessed via a Tor browser at *http://yjxlc3imv7obva4grjae #+attr_html: :width 60% :align center [[file:images/pubkey.png]] -*XMPP:* bob@freedombone.net with OMEMO or OpenPGP +*XMPP channel:* support@chat.freedombone.net *Matrix:* #fbone:matrix.freedombone.net diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 33f73ab4..94c408ca 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -61,6 +61,11 @@ if [ $DEVELOPMENT_BRANCH ]; then fi fi +# upgrading file prevents USB canary from activating +if [ ! -f /tmp/.upgrading ]; then + touch /tmp/.upgrading +fi + if [ -f /usr/bin/backupdatabases ]; then if grep -q "cat /root/dbpass" /usr/bin/backupdatabases; then # update to using the password manager @@ -91,6 +96,7 @@ if [ -d "$PROJECT_DIR" ]; then fi if ! ${PROJECT_NAME} -c "$CONFIGURATION_FILE"; then + rm /tmp/.upgrading exit 453536 fi @@ -118,4 +124,9 @@ fi # If logging was left on then turn it off ${PROJECT_NAME}-logging off +# upgrading file prevents USB canary from activating +if [ -f /tmp/.upgrading ]; then + rm /tmp/.upgrading +fi + # deliberately there is no 'exit 0' here diff --git a/src/freedombone-usb-canary b/src/freedombone-usb-canary index f57bfaaa..88cdd9db 100755 --- a/src/freedombone-usb-canary +++ b/src/freedombone-usb-canary @@ -28,12 +28,24 @@ PROJECT_NAME=freedombone -UPTIME=$(awk -F '.' '{print $1}' < "/proc/uptime") -if [ "$UPTIME" -gt 120 ]; then - ADMIN_USER=$(grep 'Admin user' /root/${PROJECT_NAME}-completed.txt | awk -F ':' '{print $2}') - MY_EMAIL_ADDRESS=${ADMIN_USER}@$(cat /etc/hostname) - echo "USB device connected on ${DEVPATH}" | mail -s "${PROJECT_NAME} USB canary" "${MY_EMAIL_ADDRESS}" - echo "${ACTION}" > /tmp/usb-canary - echo "${MY_EMAIL_ADDRESS}" >> /tmp/usb-canary - date >> /tmp/usb-canary +if [ ! -f /tmp/.upgrading ]; then + UPTIME=$(awk -F '.' '{print $1}' < "/proc/uptime") + if [ "$UPTIME" -gt 240 ]; then + ADMIN_USER=$(grep 'Admin user' /root/${PROJECT_NAME}-completed.txt | awk -F ':' '{print $2}') + MY_EMAIL_ADDRESS=${ADMIN_USER}@$(cat /etc/hostname) + + # Which devices have changed? + devices_changed= + if [ -f /tmp/.usb_devices ]; then + lsusb -v > /tmp/.curr_usb_devices + devices_changed=$(diff /tmp/.curr_usb_devices /tmp/.usb_devices) + rm /tmp/.curr_usb_devices + fi + + echo -e "USB device connected on ${DEVPATH}\\n\\n${devices_changed}" | mail -s "${PROJECT_NAME} USB canary" "${MY_EMAIL_ADDRESS}" + echo "${ACTION}" > /tmp/usb-canary + echo "${MY_EMAIL_ADDRESS}" >> /tmp/usb-canary + date >> /tmp/usb-canary + fi fi +lsusb -v > /tmp/.usb_devices diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index 1b7d72a3..73f831ce 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -464,10 +464,13 @@ function gnusocial_hourly_script { echo '/htdocs/scripts/queuedaemon.php" | grep "/var/www")'; echo "cd /var/www/${domain_name}/htdocs"; echo "if [[ \$daemon_lines != *\"/var/www/\"* ]]; then"; - echo " ADMIN_USER=\$(cat $COMPLETION_FILE | grep 'Admin user' | awk -F ':' '{print \$2}')"; - echo " MY_EMAIL_ADDRESS=\$ADMIN_USER@$HOSTNAME"; - echo -n " echo \"Restarting ${gnusocial_type} daemons\" | mail -s \"${gnusocial_type} "; + echo " UPTIME=\$(awk -F '.' '{print \$1}' < \"/proc/uptime\")"; + echo " if [ \"\$UPTIME\" -gt 500 ]; then"; + echo " ADMIN_USER=\$(cat $COMPLETION_FILE | grep 'Admin user' | awk -F ':' '{print \$2}')"; + echo " MY_EMAIL_ADDRESS=\$ADMIN_USER@$HOSTNAME"; + echo -n " echo \"Restarting ${gnusocial_type} daemons\" | mail -s \"${gnusocial_type} "; echo "daemons not found\" \$MY_EMAIL_ADDRESS"; + echo ' fi'; echo ' su -c "sh scripts/startdaemons.sh" -s /bin/sh www-data'; echo 'fi'; echo 'php scripts/delete_orphan_files.php > /dev/null'; diff --git a/website/EN/index.html b/website/EN/index.html index 4bbb7287..6b562d8c 100644 --- a/website/EN/index.html +++ b/website/EN/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +diff --git a/website/EN/support.html b/website/EN/support.html index c264011b..1616da5f 100644 --- a/website/EN/support.html +++ b/website/EN/support.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +This site can also be accessed via a Tor browser at http://yjxlc3imv7obva4grjae6u3qw527koaytrgjgdp364hmthrst3jodiid.onion
@@ -267,7 +267,7 @@ This site can also be accessed via a Tor browser atKnow of some fabulous web system which could run on Freedombone, but currently doesn't? Contact the above, and be prepared to make a compelling argument for why it should be included.
At the present time this project is not seeking any funding. There is no crowdfunding campaign and no slick marketing video. Those aren't ruled out as future possibilities, but for now they're just not needed.
@@ -306,35 +306,35 @@ If you find this project useful then you may wish to consider donating toTesting of the install on different hardware. Also pentesting on test installations to find vulnerabilities.
A better design for this website would be nice to have. Photos, icons or other artwork are all welcome. I've always liked the cartoon artwork of the Mediagoblin project, and attractive graphics can help to get people initially interested.
If you're good at making videos then a howto for installing Freedombone onto various types of hardware, or testing the mesh system in realistic/exotic scenarios would be good. You could even host videos on PeerTube or Mediagoblin.
@@ -351,18 +351,18 @@ Raising awareness beyond the near zero current level, overcoming fear and parano
To add translations modify the json files within the locale subdirectory. Then make a pull request on the Github site.
Helping to package GNU Social and Hubzilla for Debian would be beneficial.