From 551ff387366f8d9ba162bbd86f2809e4c4944b1f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 May 2018 09:47:31 +0100 Subject: [PATCH 1/6] Increase uptime threshold for USB canary --- src/freedombone-usb-canary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-usb-canary b/src/freedombone-usb-canary index f57bfaaa..6fd7f382 100755 --- a/src/freedombone-usb-canary +++ b/src/freedombone-usb-canary @@ -29,7 +29,7 @@ PROJECT_NAME=freedombone UPTIME=$(awk -F '.' '{print $1}' < "/proc/uptime") -if [ "$UPTIME" -gt 120 ]; then +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) echo "USB device connected on ${DEVPATH}" | mail -s "${PROJECT_NAME} USB canary" "${MY_EMAIL_ADDRESS}" From 924577a6f2436641d22a5d9e0ce3a74aadabada6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 May 2018 09:53:00 +0100 Subject: [PATCH 2/6] Prevent usb canary from being activated during upgrades --- src/freedombone-upgrade | 11 +++++++++++ src/freedombone-usb-canary | 18 ++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) 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 6fd7f382..a165fd40 100755 --- a/src/freedombone-usb-canary +++ b/src/freedombone-usb-canary @@ -28,12 +28,14 @@ PROJECT_NAME=freedombone -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) - 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) + 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 + fi fi From 1b349bbd5342e66c41bf3791f5da7f3d5d0506d3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 May 2018 10:14:13 +0100 Subject: [PATCH 3/6] Allow some uptime before reporting gnusocial/postactiv daemon restart --- src/freedombone-utils-gnusocialtools | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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'; From 5aabd2c130ec27130bda5a70084242500dde54cc Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 May 2018 10:58:10 +0100 Subject: [PATCH 4/6] USB canary includes details of the device which was connected or disconnected --- src/freedombone-usb-canary | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/freedombone-usb-canary b/src/freedombone-usb-canary index a165fd40..88cdd9db 100755 --- a/src/freedombone-usb-canary +++ b/src/freedombone-usb-canary @@ -33,9 +33,19 @@ if [ ! -f /tmp/.upgrading ]; then 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) - echo "USB device connected on ${DEVPATH}" | mail -s "${PROJECT_NAME} USB canary" "${MY_EMAIL_ADDRESS}" + + # 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 From 076ddb8bb4e700437fa816fc1add819ec3dd9eeb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 May 2018 11:59:24 +0100 Subject: [PATCH 5/6] Include xmpp channel --- doc/EN/index.org | 2 +- doc/EN/support.org | 2 +- website/EN/index.html | 4 +-- website/EN/support.html | 68 ++++++++++++++++++++--------------------- 4 files changed, 38 insertions(+), 38 deletions(-) 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/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"> - + @@ -265,7 +265,7 @@ Disk images which can be cloned straight to USB or microSD drives are Developers Guide and 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 Developers Guide and Code of Conduct. There is a Matrix chat room available at #fbone:matrix.freedombone.net and an XMPP channel at support@chat.freedombone.net.

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"> - + @@ -242,13 +242,13 @@ for the JavaScript code in this tag.

-
-

Support

+
+

Support

-
-

Contact details

-
+
+

Contact details

+

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 at
-
-

Things which would be nice to have

-
+
+

Things which would be nice to have

+
-
-

Ideas

-
+
+

Ideas

+

Know 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.

-
-

Money

-
+
+

Money

+

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 to
-
-

Testing and reporting bugs

-
+
+

Testing and reporting bugs

+

Testing of the install on different hardware. Also pentesting on test installations to find vulnerabilities.

-
-

Web design and artwork

-
+ -
-

Howto videos

-
+
+

Howto videos

+

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.

-
-

More education and promotion

-
+
+

More education and promotion

+

educate.png @@ -351,18 +351,18 @@ Raising awareness beyond the near zero current level, overcoming fear and parano

-
-

Translations

-
+
+

Translations

+

To add translations modify the json files within the locale subdirectory. Then make a pull request on the Github site.

-
-

Packaging

-
+
+

Packaging

+

Helping to package GNU Social and Hubzilla for Debian would be beneficial.

From 800ec2febc2fc3094b630abb82b2869376abaec2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 May 2018 12:01:28 +0100 Subject: [PATCH 6/6] Include xmpp channel --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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).