From f42d66c8685737438ab15c22f562bd3b601e8235 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 10:28:13 +0000 Subject: [PATCH 01/24] More explanation --- tests/output.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/output.sh b/tests/output.sh index 774612f4..c1b84584 100644 --- a/tests/output.sh +++ b/tests/output.sh @@ -254,7 +254,7 @@ an administrator.\n\n######################\n\n' >> $LOG fi ;; V-51391) if [ "$3" = "en" ]; then - log_msg $2 'A file integrity baseline must be created.' + log_msg $2 'A file integrity baseline must be created. Reset the tripwire from the administrator control panel.' else log_msg $2 '必须创建文件完整性基线。' fi From b972805e67ad15034a45ad21349dfb0f65e4e06d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 12:36:21 +0000 Subject: [PATCH 02/24] Permissions on npm directory --- src/freedombone-utils-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index b8c4dd2c..b9e1703b 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -545,7 +545,7 @@ function disable_ctrl_alt_del { function lockdown_permissions { if [ -d /root/.npm ]; then - find /root/.npm -name package.json -exec chmod 700 {} \; + chmod -R 700 /root/.npm fi # All commands owned by root From 433e366b173a6a4154b859e85cd08bf0e28918cd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 14:58:43 +0000 Subject: [PATCH 03/24] Move to postgresql directory when doing backups --- src/freedombone-utils-backup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 3dc51a0d..befefd8e 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -255,6 +255,7 @@ function backup_database_local_usb { else USE_MONGODB= USE_POSTGRESQL= + cd /etc/postgresql sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension} fi if [ -f ${local_database_dir}/${1}.${database_file_extension} ]; then @@ -585,6 +586,7 @@ function backup_database_remote { else USE_MONGODB= USE_POSTGRESQL= + cd /etc/postgresql sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension} fi @@ -701,6 +703,7 @@ function restore_database_from_friend { else USE_MONGODB= USE_POSTGRESQL= + cd /etc/postgresql mysqlsuccess=$(sudo -u postgres pg_restore ${database_file}) fi if [ ! "$?" = "0" ]; then @@ -799,6 +802,7 @@ function restore_database { else USE_MONGODB= USE_POSTGRESQL= + cd /etc/postgresql mysqlsuccess=$(sudo -u postgres pg_restore $database_file) fi if [ ! "$?" = "0" ]; then From 76432f7c19089e3011034d387bf1e4e7775cc244 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 19:32:18 +0000 Subject: [PATCH 04/24] menuconfig --- doc/EN/debianinstall.org | 2 +- website/EN/debianinstall.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/EN/debianinstall.org b/doc/EN/debianinstall.org index 8b13bf45..b62f501b 100644 --- a/doc/EN/debianinstall.org +++ b/doc/EN/debianinstall.org @@ -28,7 +28,7 @@ git clone https://github.com/bashrc/freedombone cd freedombone git checkout stretch make install -freedombone makeconfig +freedombone menuonfig (or freedombone menuconfig-onion) #+END_SRC The installation process will then begin. Depending upon the hardware you're installing onto and your internet connection speed it may take quite a while to install. diff --git a/website/EN/debianinstall.html b/website/EN/debianinstall.html index 60fcaee8..02f38c0c 100644 --- a/website/EN/debianinstall.html +++ b/website/EN/debianinstall.html @@ -3,10 +3,10 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + - +
-
su
+
su
 apt-get update
 apt-get -qy install build-essential git dialog
 git clone https://github.com/bashrc/freedombone
 cd freedombone
 git checkout stretch
 make install
-freedombone makeconfig
-
+freedombone menuonfig (or freedombone menuconfig-onion) +

From 590ac1a45cff3d23a0c371207f0b191f25ae8e73 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 19:33:59 +0000 Subject: [PATCH 05/24] menuconfig --- doc/EN/debianinstall.org | 2 +- website/EN/debianinstall.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/EN/debianinstall.org b/doc/EN/debianinstall.org index b62f501b..629f6534 100644 --- a/doc/EN/debianinstall.org +++ b/doc/EN/debianinstall.org @@ -28,7 +28,7 @@ git clone https://github.com/bashrc/freedombone cd freedombone git checkout stretch make install -freedombone menuonfig (or freedombone menuconfig-onion) +freedombone menuconfig (or freedombone menuconfig-onion) #+END_SRC The installation process will then begin. Depending upon the hardware you're installing onto and your internet connection speed it may take quite a while to install. diff --git a/website/EN/debianinstall.html b/website/EN/debianinstall.html index 02f38c0c..2e7e74db 100644 --- a/website/EN/debianinstall.html +++ b/website/EN/debianinstall.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -264,7 +264,7 @@ git clone https://github.com/bashrc/freedombone cd freedombone git checkout stretch make install -freedombone menuonfig (or freedombone menuconfig-onion) +freedombone menuconfig (or freedombone menuconfig-onion) From 1297c3db1c1a2f7298a8b336f22406628a80b6d5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 20:50:58 +0000 Subject: [PATCH 06/24] Log in after install --- doc/EN/debianinstall.org | 6 ++++++ website/EN/debianinstall.html | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/EN/debianinstall.org b/doc/EN/debianinstall.org index 629f6534..6f00a2bc 100644 --- a/doc/EN/debianinstall.org +++ b/doc/EN/debianinstall.org @@ -32,3 +32,9 @@ freedombone menuconfig (or freedombone menuconfig-onion) #+END_SRC The installation process will then begin. Depending upon the hardware you're installing onto and your internet connection speed it may take quite a while to install. + +Once installed you can then log in from another system with: + +#+BEGIN_SRC bash +ssh yourusername@freedombone.local -p 2222 +#+END_SRC diff --git a/website/EN/debianinstall.html b/website/EN/debianinstall.html index 2e7e74db..569e38ab 100644 --- a/website/EN/debianinstall.html +++ b/website/EN/debianinstall.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -271,6 +271,15 @@ freedombone menuconfig (or freedombone menuconfig-onion)

The installation process will then begin. Depending upon the hardware you're installing onto and your internet connection speed it may take quite a while to install.

+ +

+Once installed you can then log in from another system with: +

+ +
+
ssh yourusername@freedombone.local -p 2222
+
+
From 44fcd44d39c7709517279a1f9ee35ff8f95576a6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 21:05:21 +0000 Subject: [PATCH 07/24] Retire the mesh option from the freedombone-client command This is no longer the way that the mesh system is intended to be used --- man/freedombone-client.1.gz | Bin 1275 -> 1229 bytes src/freedombone-client | 14 +------------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/man/freedombone-client.1.gz b/man/freedombone-client.1.gz index 4447677630d33d8782bbf932da59b85f35d89e92..401a425df029610b551c356ad94971e9ceaacfdc 100644 GIT binary patch literal 1229 zcmV;;1Ty;{iwFQ}qi0$G1C3T)Z{s!)eAlm7=p`)>%e`w0T!W&hllUB8^M%;yAwYqG z64w@Mi4;gGj{bdzl$5x++@XOV;w8DeGdsKMY<)o+%PdWu8_koVQmj3_qxAhx^hs!X z|HHeVQ%dpq_;QWz9or*ES3BT2yIQW&gz)!e+~L~!e06rWyj?GE zuG3^)a+00Cb-6HgEwrS@nnxv(n;@s^refNQj=Uk)Ls(qjPcM~jp9V0F_N6LHDvZ`# z_;B-8&TJpqX0-GqDnN9^y09Hk8;wKnmEOAWOu@{;F)GYytOvK;P-j{y1#bJ2Nph}G!bTK3v5h7jFBCBT(>i~WMCN3(+tNfGlJfUc z_VkqDeUjYRK5Z>LvZ%Ue57O*)WrU2OD&g6AkRX`?i%J7Pg`)bb58_%0Vj4f$vZuC@ zxF7AKX?(C%o}?0$*;3xBN>120unbGQ9*&DD&{}%mxRdD=ma@$=ly8~~SK4BFfFr&s zB)vA(V#j01fy(>UYytVsoNH@T1gM0MSOtpSx?mD?-ZP3oEDw|*Q7&ta$#;z^;IfPK zl5KS)XJe|$?1P6cfnh97Rqe{8gxso z0vTXMcn_t)zBg?p$$5o(YUCE&?X=m){GVee4crpfahgLlc@^azDz9`#4};7?X3s#v zyl7qMA=6VUB#IT-7v6+~H0n?xhUSV|9lWO?Jg7fDOQFW0OZGzhzUzA7g|guNMr}iv z2j3U`R0QzLyR&g{A!iZifoqkI8E^WqUoXkD&`L zTGvJuL)T3Ow1R51VPMgfy^sZ_47{7DixFao*R*-1iYS!t#17XCoa5W~FBL6HE_S`H ze5oAaQy6Q*@XR~N@_@&0l{Xa3aWxW;+o{M+>r--=qpXj6%45kKHzJ6iAX|9EwgCzZ zu;&&X8uMHA07A9tl4OJty^mNp^1-fO6g;8>3$^e?nbEpOs*gN~Hx>E@+~r&d=n@Hf z+k$U?RMj{ECQ47>U{Wh7!xD-;6=o>>3yXyl@LNWGuqK9Xz*NPt#}=tWA|X%|0#--p zF(7#iTq!KAu`W=v`$8e(A-ZLz4Nfi9VH(wO-;WEi$KEHF_p8e6an)=#uRR_k)7lJc zsaAzGt8w|Ex-uU6tm)U>K|@sYf{_wL=Dr<-%yI_ARGnKeAgE6pa*Yf9hzL?4x* zH$S}oIi(bz51+5mooDyT)1@-4s?sExuFomGnqMx`zD>Zt@2VE_O!K* zY!h^?D$*vfvkg0y=}L!=4my;i=s2$LeBgSBx4yr+zFDuGVXBg{bK#@c6GB^ zU0z-~&bK&k>nPi%760kt(a3_+WnmuDJgR-VbR*FGqdvzQy@y?)@HpPb{n z>40r@wcgAxF6KSB)s{NjQmJq|luQL@8YOI0zE`_wGVwwV<3Ftrr%7b4X!bjr=wnj; zew;o&PVqiTu3ewDQ2|+0-IIsH9!zCb5kplfun!=iU=kL!0e}ic4bwh|ZwnC9gvpKr zwM~Kh(LS2S2Rj|8(5kXK%356&6ZRe~!xFE{ab5|nWeANwoy}k=+iZ&R%`)Xnm(PxH z#5Z|C&rP-3^B8iV@@_p}LcVkF+Zq)CDitDDg`&4!Op4z3j3N*hM@lGAE@w|DbdAp8 zvWxVRYfU6)Ypcp0#KR~u8w=q;TN7+U=mIEiFaHj$K^dbrcvMwP$VO*J(i-ablJY-E zt-UX4&z+ADc5KjE0eS22O4Plx7XKHlqGXE#CXw2~x?+e`leaw&dMn>M@fMv)xt*Xv zx71q504pj4C=K?5ZL5NO(5R>=j=6hj-}E^r;E8B~*1QSMTCZKiZT$V@VO z0wVLG_0mJOr&bjxmawmam4poHP$7olidrMyQxGodkIz!5ap;nRGO<}FG7^DwC5;m}k*=9oQ+31DSxeYG+)nZ)NE`!6yXTR;Q?BwM|cc_S## z`7xI=tZv_pBUDS8GMRjeG)^v{JFSYeYjs; zEopPUp!MPw23q6f=I-ob^^X2n+^4+?1)>!2rG$FQCG(h!cIX;x1JD`3Be-aN8~X_z z)>J?nOXH=UzU*5{Vcx;JjS3whO1!4cDxF8key8@hX5k#)zW=PPyySe}D?F6i6F#|h zPR4lFp+Sy#{Fcz9V4kayc-&4^X4{aG$3$my(o-Hw=DAVQhJ*%!N5}~%FiM|>#V{hi zRSzK4+b&5)7}5KPg(DyA`<2BbI~4u)Ew|iQ zgv(m2fAkf8mi(`sHq%&9GCrcK`Q7IH`Zi6@Y(|$hK%X`Jn%V64qZd<5vfq+v=8~J` l&1`wIJf+3_m$z>gKfaCDPn?}T#eViK`4{T~bipDD000YYiHZOK diff --git a/src/freedombone-client b/src/freedombone-client index d8783890..29463bdf 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -36,7 +36,6 @@ CURR_GROUP=$USER if [ -f /usr/bin/pacman ]; then CURR_GROUP='users' fi -MESH_CLIENT_INSTALL= ENABLE_MONKEYSPHERE= # setup for a specific app @@ -211,7 +210,7 @@ function configure_monkeysphere { function show_help { echo '' - echo $"${PROJECT_NAME}-client --mesh [yes|no] --monkeysphere [yes|no]" + echo $"${PROJECT_NAME}-client --monkeysphere [yes|no]" echo '' exit 0 } @@ -319,10 +318,6 @@ do verify_ssh_server_key exit 0 ;; - -m|--mesh) - shift - MESH_CLIENT_INSTALL=${1} - ;; --monkeysphere|--ms|--monkey) shift ENABLE_MONKEYSPHERE=${1} @@ -342,12 +337,5 @@ configure_ssh_client global_rate_limit configure_monkeysphere remove_known_hosts_entries -if [[ $MESH_CLIENT_INSTALL == $'yes' || $MESH_CLIENT_INSTALL == $'y' || $MESH_CLIENT_INSTALL == $'on' ]]; then - echo $'Installing mesh packages' - sudo ${PROJECT_NAME}-mesh-install -f tox_node - sudo ${PROJECT_NAME}-mesh-install -f toxic - ${PROJECT_NAME}-mesh-install -f qtox - sudo ${PROJECT_NAME}-mesh-install -f zeronet -fi echo $'Configuration complete' exit 0 From 8abeb56beace75d2ba123d2f5ebded319a39d99f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Jan 2018 21:52:55 +0000 Subject: [PATCH 08/24] Deprecate smilodon --- src/freedombone-app-smilodon | 381 ----------------------------------- 1 file changed, 381 deletions(-) delete mode 100755 src/freedombone-app-smilodon diff --git a/src/freedombone-app-smilodon b/src/freedombone-app-smilodon deleted file mode 100755 index 6d759e07..00000000 --- a/src/freedombone-app-smilodon +++ /dev/null @@ -1,381 +0,0 @@ -#!/bin/bash -# -# .---. . . -# | | | -# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-. -# | | (.-' (.-' ( | ( )| | | | )( )| | (.-' -# ' ' --' --' -' - -' ' ' -' -' -' ' - --' -# -# Freedom in the Cloud -# -# Smilodon ActivityPub app -# -# License -# ======= -# -# Copyright (C) 2017 Bob Mottram -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -VARIANTS='' - -IN_DEFAULT_INSTALL=0 -SHOW_ON_ABOUT=1 -SHOW_ICANN_ADDRESS_ON_ABOUT=0 - -SMILODON_REPO="https://github.com/bashrc/smilodon" -SMILODON_COMMIT='18c91b84737fbb1a106d3c495730ac3261aac335' -SMILODON_ADMIN_PASSWORD= -SMILODON_ONION_PORT=8054 -SMILODON_PATH=/etc/smilodon -SMILODON_SECRET_KEY= - -smilodon_variables=(SMILODON_REPO - SMILODON_ADMIN_PASSWORD - USB_MOUNT - SMILODON_SECRET_KEY - MY_EMAIL_ADDRESS - MY_USERNAME) - -function logging_on_smilodon { - echo -n '' -} - -function logging_off_smilodon { - echo -n '' -} - -function remove_user_smilodon { - remove_username="$1" -} - -function add_user_smilodon { - new_username="$1" - new_user_password="$2" - echo '0' -} - -function install_interactive_smilodon { - echo -n '' - APP_INSTALLED=1 -} - -function change_password_smilodon { - curr_username="$1" - new_user_password="$2" - - #${PROJECT_NAME}-pass -u "$curr_username" -a smilodon -p "$new_user_password" -} - -function smilodon_create_database { - if [ ! $SMILODON_ADMIN_PASSWORD ]; then - return - fi - - function_check create_database_mongodb - create_database_mongodb smilodon "$SMILODON_ADMIN_PASSWORD" smilodon -} - -function reconfigure_smilodon { - echo -n '' -} - -function upgrade_smilodon { - CURR_SMILODON_COMMIT=$(get_completion_param "smilodon commit") - if [[ "$CURR_SMILODON_COMMIT" == "$SMILODON_COMMIT" ]]; then - return - fi - - if [[ $(app_is_installed smilodon) == "1" ]]; then - systemctl stop smilodon - function_check set_repo_commit - set_repo_commit $SMILODON_PATH "smilodon commit" "$SMILODON_COMMIT" $SMILODON_REPO - chown -R smilodon:smilodon $SMILODON_PATH - systemctl start smilodon - fi - -} - -function backup_local_smilodon { - if [ ! -d $SMILODON_PATH ]; then - return - fi - - systemctl stop smilodon - - USE_MONGODB=1 - function_check backup_database_to_usb - backup_database_to_usb smilodon - - backup_directory_to_usb $SMILODON_PATH smilodon - - systemctl start smilodon -} - -function restore_local_smilodon { - temp_restore_dir=/root/tempsmilodon - - systemctl stop smilodon - - function_check smilodon_create_database - smilodon_create_database - - USE_MONGODB=1 - restore_database smilodon - - if [ -d ${SMILODON_PATH} ]; then - if [ -d $temp_restore_dir${SMILODON_PATH} ]; then - if [ -d $temp_restore_dir${SMILODON_PATH} ]; then - rm -rf ${SMILODON_PATH} - mv $temp_restore_dir$SMILODON_PATH ${SMILODON_PATH}/ - else - cp -r $temp_restore_dir/* ${SMILODON_PATH}/ - fi - if [ ! "$?" = "0" ]; then - function_check backup_unmount_drive - backup_unmount_drive - systemctl start smilodon - exit 528823 - fi - chown -R smilodon:smilodon ${SMILODON_PATH} - fi - fi - - if [ -d $USB_MOUNT/backup/smilodon ]; then - chown -R smilodon:smilodon ${SMILODON_PATH} - if [ -d $temp_restore_dir ]; then - rm -rf $temp_restore_dir - fi - fi - - systemctl start smilodon -} - -function backup_remote_smilodon { - if [ -d $SMILODON_PATH ]; then - function_check suspend_site - suspend_site smilodon - - systemctl stop smilodon - - USE_MONGODB=1 - function_check backup_database_to_friend - backup_database_to_friend smilodon - - function_check backup_directory_to_friend - backup_directory_to_friend $SMILODON_PATH smilodon - - systemctl start smilodon - - function_check restart_site - restart_site - else - echo $"Smilodon domain specified but not found in $SMILODON_PATH" - fi -} - -function restore_remote_smilodon { - temp_restore_dir=/root/tempsmilodon - if grep -q "smilodon domain" $COMPLETION_FILE; then - echo $"Restoring smilodon" - systemctl stop smilodon - - function_check restore_database_from_friend - - function_check smilodon_create_database - smilodon_create_database - - USE_MONGODB=1 - restore_database_from_friend smilodon - - if [ -d $SMILODON_PATH ]; then - if [ -d $temp_restore_dir$SMILODON_PATH ]; then - rm -rf $SMILODON_PATH - mv $temp_restore_dir$SMILODON_PATH ${SMILODON_PATH}/ - else - cp -r $temp_restore_dir/* ${SMILODON_PATH}/ - fi - if [ ! "$?" = "0" ]; then - systemctl start smilodon - exit 6391643 - fi - fi - - if [ -d $SERVER_DIRECTORY/backup/smilodon ]; then - chown -R smilodon:smilodon ${SMILODON_PATH} - fi - if [ -d /root/tempsmilodon ]; then - rm -rf /root/tempsmilodon - fi - - systemctl start smilodon - - echo $"Restore of smilodon complete" - fi -} - -function remove_smilodon { - nginx_dissite smilodon - - systemctl stop smilodon - systemctl disable smilodon - rm /etc/systemd/system/smilodon.service - - function_check remove_onion_service - remove_onion_service smilodon ${SMILODON_ONION_PORT} - if [ -f /etc/nginx/sites-available/smilodon ]; then - rm /etc/nginx/sites-available/smilodon - fi - - groupdel -f smilodon - userdel -r smilodon - - if [ -d $SMILODON_PATH ]; then - rm -rf $SMILODON_PATH - fi - - function_check remove_mongodb_user - remove_mongodb_user smilodon - - function_check drop_database_mongodb - drop_database_mongodb smilodon - - function_check remove_mongodb - remove_mongodb smilodon - - remove_completion_param install_smilodon - sed -i '/smilodon/d' $COMPLETION_FILE -} - -function install_smilodon { - apt-get -yq install python3-pip - - if [ -d $SMILODON_PATH ]; then - rm -rf $SMILODON_PATH - fi - - if [ -d /repos/smilodon ]; then - mkdir $SMILODON_PATH - cp -r -p /repos/smilodon/. $SMILODON_PATH - cd $SMILODON_PATH - git pull - else - function_check git_clone - git_clone $SMILODON_REPO $SMILODON_PATH - fi - - if [ ! -d $SMILODON_PATH ]; then - echo $'Could not clone smilodon repo' - exit 6784783 - fi - cd $SMILODON_PATH - git checkout $SMILODON_COMMIT -b $SMILODON_COMMIT - set_completion_param "smilodon commit" "$SMILODON_COMMIT" - - sed -i 's|https:|http:|g' $SMILODON_PATH/api/utilities.py - - groupadd smilodon - useradd -c "Smilodon system account" -d $SMILODON_PATH -m -r -g smilodon smilodon - - SMILODON_ONION_HOSTNAME=$(add_onion_service smilodon 80 ${SMILODON_ONION_PORT}) - - if [ ! $SMILODON_SECRET_KEY ]; then - SMILODON_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)$(create_password 30)" - fi - - if [ -f $IMAGE_PASSWORD_FILE ]; then - SMILODON_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" - else - if [ ! $SMILODON_ADMIN_PASSWORD ]; then - SMILODON_ADMIN_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" - fi - fi - - export smilodon_domain_name=$SMILODON_ONION_HOSTNAME - export secret_key="$SMILODON_SECRET_KEY" - export mongodb_username='smilodon' - export mongodb_password="$SMILODON_ADMIN_PASSWORD" - export smilodon_admin_address=$MY_EMAIL_ADDRESS - export MAIL_SERVER='localhost' - export MAIL_PORT=25 - - function_check install_mongodb - install_mongodb smilodon - - smilodon_create_database - - pip3 install -r requirements.txt - if [ ! "$?" = "0" ]; then - echo $'Unable to install smilodon dependencies' - exit 87352835 - fi - - echo 'server {' > /etc/nginx/sites-available/smilodon - echo " listen 127.0.0.1:${SMILODON_ONION_PORT} default_server;" >> /etc/nginx/sites-available/smilodon - echo " server_name $SMILODON_ONION_HOSTNAME;" >> /etc/nginx/sites-available/smilodon - echo '' >> /etc/nginx/sites-available/smilodon - echo ' access_log /dev/null;' >> /etc/nginx/sites-available/smilodon - echo ' error_log /dev/null;' >> /etc/nginx/sites-available/smilodon - echo '' >> /etc/nginx/sites-available/smilodon - echo ' location / {' >> /etc/nginx/sites-available/smilodon - echo ' proxy_pass http://localhost:5000;' >> /etc/nginx/sites-available/smilodon - echo ' }' >> /etc/nginx/sites-available/smilodon - echo '}' >> /etc/nginx/sites-available/smilodon - - nginx_ensite smilodon - systemctl enable mongodb - systemctl restart mongodb - - chown -R smilodon:smilodon ${SMILODON_PATH} - - echo '#!/bin/bash' > ${SMILODON_PATH}/run_smilodon.sh - echo "cd ${SMILODON_PATH}" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export smilodon_domain_name=$SMILODON_ONION_HOSTNAME" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export secret_key='$SMILODON_SECRET_KEY'" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export mongodb_username='smilodon'" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export mongodb_password='$SMILODON_ADMIN_PASSWORD'" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export smilodon_admin_address=$MY_EMAIL_ADDRESS" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export MAIL_SERVER='localhost'" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export MAIL_PORT=25" >> ${SMILODON_PATH}/run_smilodon.sh - echo "export API_NAME=$SMILODON_ONION_HOSTNAME" >> ${SMILODON_PATH}/run_smilodon.sh - echo "python3 run.py" >> ${SMILODON_PATH}/run_smilodon.sh - chmod +x ${SMILODON_PATH}/run_smilodon.sh - chown smilodon:smilodon ${SMILODON_PATH}/run_smilodon.sh - - echo '[Unit]' > /etc/systemd/system/smilodon.service - echo 'Description=Smilodon ActivityPub messenger' >> /etc/systemd/system/smilodon.service - echo 'After=network.target mongodb.service' >> /etc/systemd/system/smilodon.service - echo 'After=tor.service' >> /etc/systemd/system/smilodon.service - echo '' >> /etc/systemd/system/smilodon.service - echo '[Service]' >> /etc/systemd/system/smilodon.service - echo 'User=smilodon' >> /etc/systemd/system/smilodon.service - echo 'Group=smilodon' >> /etc/systemd/system/smilodon.service - echo "WorkingDirectory=${SMILODON_PATH}/" >> /etc/systemd/system/smilodon.service - echo "ExecStart=${SMILODON_PATH}/run_smilodon.sh" >> /etc/systemd/system/smilodon.service - echo 'Restart=on-failure' >> /etc/systemd/system/smilodon.service - echo 'RestartSec=10' >> /etc/systemd/system/smilodon.service - echo '' >> /etc/systemd/system/smilodon.service - echo '[Install]' >> /etc/systemd/system/smilodon.service - echo 'WantedBy=multi-user.target' >> /etc/systemd/system/smilodon.service - systemctl enable smilodon - systemctl daemon-reload - systemctl start smilodon - systemctl restart nginx - - ${PROJECT_NAME}-pass -u $MY_USERNAME -a smilodon -p "$SMILODON_ADMIN_PASSWORD" - - APP_INSTALLED=1 -} - -# NOTE: deliberately no exit 0 From 0b606c06d2ab6c98073f1a466465aa93ed84263c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Jan 2018 15:18:52 +0000 Subject: [PATCH 09/24] Create directories when restoring rss --- src/freedombone-app-rss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 925f70e0..37961f33 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -176,6 +176,9 @@ function restore_local_rss { rm -rf /etc/share/tt-rss mv $temp_restore_dir/etc/share/tt-rss /etc/share/ else + if [ ! -d /etc/share/tt-rss ]; then + mkdir -p /etc/share/tt-rss + fi cp -r $temp_restore_dir/* /etc/share/tt-rss/ fi if [ ! "$?" = "0" ]; then @@ -249,6 +252,9 @@ function restore_remote_rss { rm -rf /etc/share/tt-rss mv $temp_restore_dir/etc/share/tt-rss /etc/share/ else + if [ ! -d /etc/share/tt-rss ]; then + mkdir -p /etc/share/tt-rss + fi cp -r $temp_restore_dir/* /etc/share/tt-rss/ fi if [ ! "$?" = "0" ]; then From 48a8db20531104d99ae05be56e1bc7aed285b25e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Jan 2018 15:36:29 +0000 Subject: [PATCH 10/24] Fixing ttrss backup and restore --- src/freedombone-app-rss | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 37961f33..b58762dd 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -149,8 +149,6 @@ function upgrade_rss { function backup_local_rss { if [ -d /etc/share/tt-rss ]; then - RSS_READER_DOMAIN_NAME=$(get_completion_param "rss reader domain") - echo $"Backing up ttrss" function_check backup_database_to_usb @@ -168,7 +166,7 @@ function restore_local_rss { function_check rss_create_database rss_create_database - restore_database ttrss ${RSS_READER_DOMAIN_NAME} + restore_database ttrss if [ -d /etc/share/tt-rss ]; then if [ -d $temp_restore_dir/etc/share/tt-rss ]; then @@ -219,7 +217,7 @@ function restore_local_rss { function backup_remote_rss { if [ -d /etc/share/tt-rss ]; then function_check suspend_site - suspend_site ${RSS_READER_DOMAIN_NAME} + suspend_site ttrss function_check backup_database_to_friend backup_database_to_friend ttrss @@ -232,7 +230,8 @@ function backup_remote_rss { function_check restart_site restart_site else - echo $"RSS reader domain specified but not found in /etc/share/ttrss}" + echo $"/etc/share/tt-rss directory not found}" + exit 783532 fi } @@ -245,7 +244,7 @@ function restore_remote_rss { function_check rss_create_database rss_create_database - restore_database_from_friend ttrss ${RSS_READER_DOMAIN_NAME} + restore_database_from_friend ttrss if [ -d /etc/share/tt-rss ]; then if [ -d $temp_restore_dir/etc/share/tt-rss ]; then From 268c1dfc8af7f324cc7777fd31a43c2c917620df Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Jan 2018 15:46:52 +0000 Subject: [PATCH 11/24] Get mariadb password when restoring ttrss --- src/freedombone-app-rss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index b58762dd..60005d66 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -163,6 +163,9 @@ function backup_local_rss { function restore_local_rss { temp_restore_dir=/root/tempttrss + function_check get_mariadb_password + get_mariadb_password + function_check rss_create_database rss_create_database @@ -239,6 +242,9 @@ function restore_remote_rss { temp_restore_dir=/root/tempttrss if grep -q "rss reader domain" $COMPLETION_FILE; then echo $"Restoring ttrss" + function_check get_mariadb_password + get_mariadb_password + function_check restore_database_from_friend function_check rss_create_database From a14ac0ff82f5e39f774ad03eee6c31b21ff1d4bb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Jan 2018 15:58:03 +0000 Subject: [PATCH 12/24] Deprecate obnam backup functions --- src/freedombone-app-rss | 6 +++ src/freedombone-utils-backup | 88 ------------------------------------ 2 files changed, 6 insertions(+), 88 deletions(-) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 60005d66..45c026ca 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -151,6 +151,9 @@ function backup_local_rss { if [ -d /etc/share/tt-rss ]; then echo $"Backing up ttrss" + function_check get_mariadb_password + get_mariadb_password + function_check backup_database_to_usb backup_database_to_usb ttrss @@ -222,6 +225,9 @@ function backup_remote_rss { function_check suspend_site suspend_site ttrss + function_check get_mariadb_password + get_mariadb_password + function_check backup_database_to_friend backup_database_to_friend ttrss diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index befefd8e..46b62aec 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -279,14 +279,6 @@ function backup_database_local_usb { echo $"Database dump was created for ${1}" } -function set_obnam_client_name { - # obnam can backup multiple machines with different domain names to - # a repository. To be able to restore directories from different - # machines we need to enforce a single client name for all backups - echo '[config]' > /etc/obnam.conf - echo "client-name = ${PROJECT_NAME}" >> /etc/obnam.conf -} - function backup_directory_to_usb_duplicity { create_backups_temp_directory echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --encrypt-key $MY_BACKUP_KEY_ID --full-if-older-than 4W --exclude-other-filesystems ${1} file://$USB_MOUNT/backup/${2} @@ -320,38 +312,6 @@ function backup_directory_to_usb_duplicity { remove_backups_temp_directory } -function backup_directory_to_usb_obnam { - set_obnam_client_name - echo "$BACKUP_DUMMY_PASSWORD" | obnam force-lock -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1} - echo "$BACKUP_DUMMY_PASSWORD" | obnam backup -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1} - if [[ $ENABLE_BACKUP_VERIFICATION == "yes" ]]; then - echo "$BACKUP_DUMMY_PASSWORD" | obnam verify -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1} - if [ ! "$?" = "0" ]; then - umount $USB_MOUNT - rm -rf $USB_MOUNT - if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then - shred -zu ${1}/* - rm -rf ${1} - fi - function_check restart_site - restart_site - exit 683252 - fi - fi - echo "$BACKUP_DUMMY_PASSWORD" | obnam forget --keep=30d -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID - if [ ! "$?" = "0" ]; then - umount $USB_MOUNT - rm -rf $USB_MOUNT - if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then - shred -zu ${1}/* - rm -rf ${1} - fi - function_check restart_site - restart_site - exit 7 - fi -} - function backup_directory_to_usb { if [ ! -d ${1} ]; then echo $"WARNING: directory does not exist: ${1}" @@ -370,7 +330,6 @@ function backup_directory_to_usb { fi backup_directory_to_usb_duplicity ${1} ${2} - #backup_directory_to_usb_obnam ${1} ${2} if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then shred -zu ${1}/* @@ -379,11 +338,6 @@ function backup_directory_to_usb { fi } -function restore_directory_from_usb_obnam { - set_obnam_client_name - echo "$BACKUP_DUMMY_PASSWORD" | obnam restore -r $USB_MOUNT/backup/${2} --to ${1} -} - function restore_directory_from_usb_duplicity { create_backups_temp_directory PASSPHRASE="$BACKUP_DUMMY_PASSWORD" duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1} @@ -409,12 +363,6 @@ function restore_directory_from_usb { mkdir ${1} fi restore_directory_from_usb_duplicity ${1} ${2} - #restore_directory_from_usb_obnam ${1} ${2} -} - -function restore_directory_from_friend_obnam { - set_obnam_client_name - echo "$BACKUP_DUMMY_PASSWORD" | obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1} } function restore_directory_from_friend_duplicity { @@ -426,12 +374,10 @@ function restore_directory_from_friend_duplicity { function restore_directory_from_friend { if [ ! ${1} ]; then - echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}" echo $'No restore destination given' return fi if [ ! ${2} ]; then - echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}" echo $'No restore source given' return fi @@ -439,7 +385,6 @@ function restore_directory_from_friend { mkdir ${1} fi restore_directory_from_friend_duplicity ${1} ${2} - #restore_directory_from_friend_obnam ${1} ${2} } function backup_database_to_usb { @@ -493,38 +438,6 @@ function backup_directory_to_friend_duplicity { remove_backups_temp_directory } -function backup_directory_to_friend_obnam { - set_obnam_client_name - echo "$BACKUP_DUMMY_PASSWORD" | obnam force-lock -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID} ${1} - echo "$BACKUP_DUMMY_PASSWORD" | obnam backup -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID} ${1} - if [[ $ENABLE_VERIFICATION == "yes" ]]; then - echo "$BACKUP_DUMMY_PASSWORD" | obnam verify -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID} ${1} - if [ ! "$?" = "0" ]; then - if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then - shred -zu /root/temp${2}/* - rm -rf /root/temp${2} - fi - # Send a warning email - echo "Unable to verify ${2}" | mail -s "${PROJECT_NAME} backup to friends" ${ADMIN_EMAIL_ADDRESS} - function_check restart_site - restart_site - exit 953 - fi - fi - echo "$BACKUP_DUMMY_PASSWORD" | obnam forget --keep=30d -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID} - if [ ! "$?" = "0" ]; then - if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then - shred -zu /root/temp${2}/* - rm -rf /root/temp${2} - fi - # Send a warning email - echo "Unable to backup ${2}" | mail -s "${PROJECT_NAME} backup to friends" ${ADMIN_EMAIL_ADDRESS} - function_check restart_site - restart_site - exit 853 - fi -} - function backup_directory_to_friend { BACKUP_KEY_EXISTS=$(gpg --list-keys "$ADMIN_NAME (backup key)") if [ ! "$?" = "0" ]; then @@ -540,7 +453,6 @@ function backup_directory_to_friend { fi backup_directory_to_friend_duplicity ${1} ${2} - #backup_directory_to_friend_obnam ${1} ${2} if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then shred -zu /root/temp${2}/* From 57cc40019d99c3cf30a70ccc9546429b604e76a0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Jan 2018 16:32:31 +0000 Subject: [PATCH 13/24] restore database test --- src/freedombone-utils-backup | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 46b62aec..80f57dad 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -705,6 +705,7 @@ function restore_database { USE_MONGODB= USE_POSTGRESQL= keep_database_running + cp $database_file ~/test.sql mysqlsuccess=$(mysql -u root --password="$DATABASE_PASSWORD" ${restore_app_name} -o < $database_file) else USE_MONGODB= From b20eec16df54e25816d3671f59a9ea98b8a26d8a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Jan 2018 17:03:14 +0000 Subject: [PATCH 14/24] Check that database backup exists --- src/freedombone-app-rss | 8 +------- src/freedombone-utils-backup | 10 ++++++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 45c026ca..7cc02942 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -169,9 +169,7 @@ function restore_local_rss { function_check get_mariadb_password get_mariadb_password - function_check rss_create_database - rss_create_database - + function_check restore_database restore_database ttrss if [ -d /etc/share/tt-rss ]; then @@ -252,10 +250,6 @@ function restore_remote_rss { get_mariadb_password function_check restore_database_from_friend - - function_check rss_create_database - rss_create_database - restore_database_from_friend ttrss if [ -d /etc/share/tt-rss ]; then diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 80f57dad..39e1de00 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -583,7 +583,7 @@ function restore_database_from_friend { DATABASE_PASSWORD= RESTORE_SUBDIR="root" - if [ -d $SERVER_DIRECTORY/backup/${1} ]; then + if [ -d $SERVER_DIRECTORY/backup/${1}data ]; then database_file_extension='sql' if [ $USE_MONGODB ]; then database_file_extension='mdb' @@ -666,6 +666,9 @@ function restore_database_from_friend { fi fi fi + else + echo $"No database backup found for ${1}" + exit 6239353 fi } @@ -674,7 +677,7 @@ function restore_database { restore_app_name=$1 restore_app_domain=$2 - if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then + if [ -d $USB_MOUNT/backup/${restore_app_name}data ]; then echo $"Restoring ${restore_app_name} database" local_database_dir=/root/temp${restore_app_name}data if [ -d ${local_database_dir} ]; then @@ -776,6 +779,9 @@ function restore_database { fi fi fi + else + echo $"No database backup found for ${restore_app_name}" + exit 7357224 fi } From a22743f3fb6fc5c7a8d0628bea23e24b7a5fe545 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Jan 2018 17:09:35 +0000 Subject: [PATCH 15/24] Unmount on failure --- src/freedombone-utils-backup | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 39e1de00..3cbb078d 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -781,6 +781,8 @@ function restore_database { fi else echo $"No database backup found for ${restore_app_name}" + set_user_permissions + backup_unmount_drive exit 7357224 fi } From 9dcb09580d2bbe39f1259811f316f0a668a7c2b8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 10:56:30 +0000 Subject: [PATCH 16/24] Make an exception for prosody --- tests/check-libs-owner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/check-libs-owner.sh b/tests/check-libs-owner.sh index b99ef1d7..fa3d1eca 100644 --- a/tests/check-libs-owner.sh +++ b/tests/check-libs-owner.sh @@ -22,7 +22,7 @@ if [ -d "/lib64" ];then fi if [ -d "/usr/lib" ];then - COUNT=$(find -L /usr/lib \! -user root -exec ls -l {} \; |wc -l) + COUNT=$(find -L /usr/lib -path /usr/lib/prosody -prune -o \! -user root -exec ls -l {} \; |wc -l) if [ $COUNT -eq 0 ];then : From 622b3af99fd2312f8c89bd0c7fe61a3a50e502f0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 11:00:43 +0000 Subject: [PATCH 17/24] Make an exception for prosody --- tests/output.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/output.sh b/tests/output.sh index c1b84584..a94c2e3d 100644 --- a/tests/output.sh +++ b/tests/output.sh @@ -487,7 +487,7 @@ time, are stored in the following directories by default:\n\n/lib\n/lib64\n/usr/ fi find -L /lib \! -user root -exec ls -l {} \; | grep -v '> /dev/null' find -L /lib64 \! -user root -exec ls -l {} \; - find -L /usr/lib \! -user root -exec ls -l {} \; + find -L /usr/lib -path /usr/lib/prosody -prune -o \! -user root -exec ls -l {} \; if [ -d /usr/lib64 ]; then find -L /usr/lib64 \! -user root -exec ls -l {} \; fi From b0d728107e3ae1f97973d52a7a58cfbc29cc18c9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 11:05:05 +0000 Subject: [PATCH 18/24] Include prosody exception in lockdown --- src/freedombone-utils-setup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index b9e1703b..eec1df05 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -593,6 +593,9 @@ function lockdown_permissions { if [ -d /usr/lib/node_modules ]; then chmod -R 750 /usr/lib/node_modules/* fi + if [ -d /usr/lib/prosody ]; then + chown -R prosody:prosody /usr/lib/prosody + fi fi if [ -d /usr/lib64 ]; then chown -R root:root /usr/lib64/* From 09a68c7a286f701bc6cfb3ab0d0c1d52a07f31a3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 11:40:19 +0000 Subject: [PATCH 19/24] Notes --- src/freedombone-app-xmpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index cf1eddc0..7cc33b4f 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -10,6 +10,10 @@ # # XMPP functions # +# The two directories for prosody modules seem necessary. +# Trying to remove /usr/lib/prosody/modules causes problems, and that's +# part of the package install. +# # License # ======= # From 32d52faf9fbb817592105fca2159eb91896e968b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 12:17:37 +0000 Subject: [PATCH 20/24] Install tor daemon from backports --- src/freedombone-app-xmpp | 2 +- src/freedombone-image-customise | 2 +- src/freedombone-upgrade | 6 ++++++ src/freedombone-utils-onion | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 7cc33b4f..0a853c4d 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -17,7 +17,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index fa399cd8..7e9410b3 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -909,7 +909,7 @@ initialise_mesh() { chroot "$rootdir" apt-get -yq install apt-transport-https # install tor as a possible way of routing traffic between internet gateways - chroot "$rootdir" apt-get -yq install tor + chroot "$rootdir" apt-get -yq -t stretch-backports install tor # dhcp daemon for hotspot on secondary wifi adapter chroot "$rootdir" apt-get -yq install dnsmasq diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 50a73033..35ad41e4 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -97,6 +97,12 @@ if [ -d $PROJECT_DIR ]; then email_install_tls email_disable_chunking #defrag_filesystem + + # reinstall tor from backports + tor_version=$(tor --version) + if [[ "$tor_version" == *' 0.2'* ]]; then + apt-get -yq -t stretch-backports install tor + fi fi fi diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index e90a3ab5..83d5338d 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -270,7 +270,7 @@ function install_tor { return fi - apt-get -yq install tor + apt-get -yq -t stretch-backports install tor if [ ! -f /etc/tor/torrc ]; then echo 'Tor failed to install' exit 38259 From a89024596c4ec6854a8dbb4a1c1be446d62ffb8c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 12:20:53 +0000 Subject: [PATCH 21/24] keep torrc configuration --- src/freedombone-upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 35ad41e4..08e8abae 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -101,7 +101,7 @@ if [ -d $PROJECT_DIR ]; then # reinstall tor from backports tor_version=$(tor --version) if [[ "$tor_version" == *' 0.2'* ]]; then - apt-get -yq -t stretch-backports install tor + echo 'N' | apt-get -yq -t stretch-backports install tor fi fi fi From 76d24b01cdb3397f72e7840d57a71bb717e7e814 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 14:57:14 +0000 Subject: [PATCH 22/24] Recommended pleroma nginx config --- src/freedombone-app-pleroma | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-pleroma b/src/freedombone-app-pleroma index 4e3f76c5..1ff2aa58 100755 --- a/src/freedombone-app-pleroma +++ b/src/freedombone-app-pleroma @@ -875,6 +875,9 @@ function install_pleroma { if [[ $ONION_ONLY == "no" ]]; then function_check nginx_http_redirect nginx_http_redirect $PLEROMA_DOMAIN_NAME "index index.html" + echo '' >> $pleroma_nginx_site + echo 'proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=100m inactive=80m use_temp_path=off;' >> $pleroma_nginx_site + echo '' >> $pleroma_nginx_site echo 'server {' >> $pleroma_nginx_site echo ' listen 443 ssl;' >> $pleroma_nginx_site echo ' listen [::]:443 ssl;' >> $pleroma_nginx_site @@ -902,12 +905,23 @@ function install_pleroma { echo ' location / {' >> $pleroma_nginx_site function_check nginx_limits nginx_limits $PLEROMA_DOMAIN_NAME '15m' + echo ' proxy_http_version 1.1;' >> $pleroma_nginx_site + echo ' proxy_set_header Upgrade $http_upgrade;' >> $pleroma_nginx_site + echo ' proxy_set_header Connection "upgrade";' >> $pleroma_nginx_site + echo " proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site + echo ' }' >> $pleroma_nginx_site + echo '' >> $pleroma_nginx_site + echo ' location /proxy {' >> $pleroma_nginx_site + nginx_limits $PLEROMA_DOMAIN_NAME '15m' + echo ' proxy_cache pleroma_media_cache;' >> $pleroma_nginx_site + echo ' proxy_cache_lock on;' >> $pleroma_nginx_site echo " proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site echo ' }' >> $pleroma_nginx_site echo ' # include snippets/well-known.conf;' >> $pleroma_nginx_site echo '}' >> $pleroma_nginx_site else - echo -n '' > $pleroma_nginx_site + echo 'proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=100m inactive=80m use_temp_path=off;' >> $pleroma_nginx_site + echo '' >> $pleroma_nginx_site fi echo 'server {' >> $pleroma_nginx_site echo " listen 127.0.0.1:$PLEROMA_ONION_PORT default_server;" >> $pleroma_nginx_site @@ -929,6 +943,16 @@ function install_pleroma { echo ' location / {' >> $pleroma_nginx_site function_check nginx_limits nginx_limits $PLEROMA_DOMAIN_NAME '15m' + echo ' proxy_http_version 1.1;' >> $pleroma_nginx_site + echo ' proxy_set_header Upgrade $http_upgrade;' >> $pleroma_nginx_site + echo ' proxy_set_header Connection "upgrade";' >> $pleroma_nginx_site + echo " proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site + echo ' }' >> $pleroma_nginx_site + echo '' >> $pleroma_nginx_site + echo ' location /proxy {' >> $pleroma_nginx_site + nginx_limits $PLEROMA_DOMAIN_NAME '15m' + echo ' proxy_cache pleroma_media_cache;' >> $pleroma_nginx_site + echo ' proxy_cache_lock on;' >> $pleroma_nginx_site echo " proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site echo ' }' >> $pleroma_nginx_site echo ' # include snippets/well-known.conf;' >> $pleroma_nginx_site From a56fade1d50a41bb86956e4d426a7e294d956c17 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 17:04:25 +0000 Subject: [PATCH 23/24] Remove temporary files after use --- src/freedombone-controlpanel | 151 +++++++++++++++++++++++------- src/freedombone-controlpanel-user | 96 ++++++++++++++----- 2 files changed, 187 insertions(+), 60 deletions(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 501d4de1..97ed03b4 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2015-2017 Bob Mottram +# Copyright (C) 2015-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -166,6 +166,7 @@ function any_key_verify { fi ;; esac + rm $data } function get_app_icann_address { @@ -304,7 +305,7 @@ function view_or_change_passwords { fi ;; esac - + rm $data } function check_for_updates { @@ -330,19 +331,23 @@ function add_user { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac new_user_username=$(cat $data | sed -n 1p) new_user_ssh_public_key=$(cat $data | sed -n 2p) if [ ${#new_user_username} -lt 2 ]; then dialog --title $"New username" \ --msgbox $"No username was given" 6 40 + rm $data return fi if [[ "$new_user_username" == *" "* ]]; then dialog --title $"Invalid username" \ --msgbox $"The username should not contain any spaces" 6 40 + rm $data return fi if [ ${#new_user_ssh_public_key} -lt 20 ]; then @@ -359,6 +364,7 @@ function add_user { --msgbox $"This does not look like an ssh public key" 6 40 fi fi + rm $data } function pad_string { @@ -742,6 +748,7 @@ function change_ssh_public_key { fi ;; esac + rm $data } function remove_user_from_mailing_list { @@ -848,8 +855,10 @@ function add_to_mailing_list { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac LIST_NAME=$(cat $data | sed -n 1p) LIST_SUBJECT=$(cat $data | sed -n 2p) @@ -867,12 +876,14 @@ function add_to_mailing_list { if [ ${#LIST_NAME} -lt 2 ]; then dialog --title $"Add mailing list" \ --msgbox $"No mailing list name was given" 6 40 + rm $data return fi if [ ${#LIST_SUBJECT} -lt 2 ]; then if [ ${#LIST_EMAIL} -lt 2 ]; then dialog --title $"Add mailing list" \ --msgbox $"No mailing list subject or address was given" 6 40 + rm $data return fi fi @@ -883,6 +894,7 @@ function add_to_mailing_list { if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then dialog --title $"Add mailing list" \ --msgbox $"Unrecognised email address" 6 40 + rm $data return else ${PROJECT_NAME}-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \ @@ -892,6 +904,7 @@ function add_to_mailing_list { dialog --title $"Add mailing list" \ --msgbox $"$LIST_NAME list was added" 6 40 + rm $data } function email_rule { @@ -910,8 +923,10 @@ function email_rule { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac RULE_EMAIL=$(cat $data | sed -n 1p) RULE_FOLDER=$(cat $data | sed -n 2p) @@ -928,16 +943,19 @@ function email_rule { if [ ${#RULE_EMAIL} -lt 2 ]; then dialog --title $"Add email rule" \ --msgbox $"No email address was given" 6 40 + rm $data return fi if [ ${#RULE_FOLDER} -lt 2 ]; then dialog --title $"Add email rule" \ --msgbox $"No folder name was given" 6 40 + rm $data return fi if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then dialog --title $"Add email rule" \ --msgbox $"Unrecognised email address" 6 40 + rm $data return fi @@ -945,6 +963,7 @@ function email_rule { -g "$RULE_FOLDER" --public $RULE_PUBLIC dialog --title $"Add email rule" \ --msgbox $"Email rule for $RULE_EMAIL was added" 6 40 + rm $data } function block_unblock_email { @@ -963,19 +982,23 @@ function block_unblock_email { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac BLOCK_EMAIL=$(cat $data | sed -n 1p) BLOCK=$(cat $data | sed -n 2p) if [ ${#BLOCK_EMAIL} -lt 2 ]; then dialog --title $"Block/Unblock an email" \ --msgbox $"No email address was given" 6 40 + rm $data return fi if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then dialog --title $"Block/Unblock an email" \ --msgbox $"Unrecognised email address" 6 40 + rm $data return fi if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then @@ -987,6 +1010,7 @@ function block_unblock_email { dialog --title $"Unblock an email" \ --msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 75 fi + rm $data } function block_unblock_subject { @@ -1005,14 +1029,17 @@ function block_unblock_subject { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac BLOCK_SUBJECT=$(cat $data | sed -n 1p) BLOCK=$(cat $data | sed -n 2p) if [ ${#BLOCK_SUBJECT} -lt 2 ]; then dialog --title $"Block/Unblock an email" \ --msgbox $"No subject was given" 6 40 + rm $data return fi if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then @@ -1024,6 +1051,7 @@ function block_unblock_subject { dialog --title $"Unblock an email" \ --msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40 fi + rm $data } function create_keydrive_master { @@ -1226,18 +1254,21 @@ function restore_data_remote { friend_server_domain_name=$(<$data) if [ ${#friend_server_domain_name} -lt 2 ]; then + rm $data return fi if [[ $friend_server_domain_name != *"."* ]]; then dialog --title $"Remote server domain name" \ --msgbox $"Invalid domain name" 6 40 + rm $data return fi restore_data_from_storage $friend_server_domain_name ;; esac + rm $data } function ping_enable_disable { @@ -1387,8 +1418,10 @@ function format_drive { --yesno $"\nPlease confirm that you wish to format drive\n\n ${USB_DRIVE}\n\nAll current data on the drive will be lost, and you will be prompted to give a password used to encrypt the drive.\n\nDANGER: If you screw up here and format the wrong drive it's your own fault!" 16 60 sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac clear @@ -1397,6 +1430,7 @@ function format_drive { echo '' ${PROJECT_NAME}-format $USB_DRIVE any_key + rm $data } function remove_backups { @@ -1409,13 +1443,16 @@ function remove_backups { --yesno $"\nPlease confirm that you wish to remove backups from this drive\n\n ${drive}\n\nYou will not be able to recover them afterwards." 12 60 sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac clear ${PROJECT_NAME}-backup-local $USB_DRIVE remove any_key + rm $data } function shut_down_system { @@ -1465,6 +1502,7 @@ function change_system_name { fi ;; esac + rm $data } function set_dynamic_IP { @@ -1515,11 +1553,14 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_ 0) NEW_STATIC_IP=$(<$data) if [[ "$NEW_STATIC_IP" != *"."* ]]; then set_dynamic_IP + rm $data return fi ;; - 1) return;; + 1) rm $data + return;; esac + rm $data # get the gateway data=$(tempfile 2>/dev/null) @@ -1531,10 +1572,12 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_ case $sel in 0) NEW_STATIC_GATEWAY=$(<$data) if [[ "$NEW_STATIC_GATEWAY" != *"."* ]]; then + rm $data return fi ;; - 1) return;; + 1) rm $data + return;; esac if [[ "$NEW_STATIC_GATEWAY" == *"."* && "$NEW_STATIC_IP" == *"."* ]]; then @@ -1604,6 +1647,7 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_ esac fi fi + rm $data } function wifi_settings { @@ -1662,8 +1706,10 @@ function hotspot_settings { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac TEMP_WIFI_HOTSPOT=$(cat $data | sed -n 1p) TEMP_WIFI_SSID=$(cat $data | sed -n 2p) @@ -1671,9 +1717,11 @@ function hotspot_settings { TEMP_WIFI_PASSPHRASE=$(cat $data | sed -n 4p) if [ ${#TEMP_WIFI_SSID} -lt 2 ]; then + rm $data return fi if [ ${#TEMP_WIFI_TYPE} -lt 2 ]; then + rm $data return fi @@ -1691,11 +1739,13 @@ function hotspot_settings { if [ ! $TEMP_WIFI_PASSPHRASE ]; then dialog --title $"Wifi Settings" \ --msgbox $"No wifi hotspot passphrase was given" 6 40 + rm $data return fi if [ ${#TEMP_WIFI_PASSPHRASE} -lt 2 ]; then dialog --title $"Wifi Settings" \ --msgbox $"Wifi hotspot passphrase was too short" 6 40 + rm $data return fi @@ -1726,6 +1776,7 @@ function hotspot_settings { dialog --title $"Wifi Settings" \ --msgbox $"Hotspot settings were changed" 6 40 + rm $data } function reinstall_mariadb { @@ -1792,6 +1843,7 @@ function email_extra_domains { fi ;; esac + rm $data } function email_smtp_proxy { @@ -1823,6 +1875,7 @@ function email_smtp_proxy { SMTP_PROXY_PORT=$(cat $data | sed -n 4p) SMTP_PROXY_USERNAME=$(cat $data | sed -n 5p) SMTP_PROXY_PASSWORD=$(cat $data | sed -n 6p) + rm $data # change muttrc if [ $SMTP_PROXY_ENABLE != $'no' ]; then @@ -1868,8 +1921,10 @@ function menu_backup_restore { 11 $"Back to main menu" on 2> $data sel=$? case $sel in - 1) break;; - 255) break;; + 1) rm $data + break;; + 255) rm $data + break;; esac case $(cat $data) in 1) backup_data;; @@ -1884,6 +1939,7 @@ function menu_backup_restore { 10) remove_backups;; 11) break;; esac + rm $data done } @@ -1905,8 +1961,10 @@ function menu_email { 8 $"Back to main menu" on 2> $data sel=$? case $sel in - 1) break;; - 255) break;; + 1) rm $data + break;; + 255) rm $data + break;; esac case $(cat $data) in 1) add_to_mailing_list;; @@ -1918,6 +1976,7 @@ function menu_email { 7) email_extra_domains;; 8) break;; esac + rm $data done } @@ -1945,6 +2004,7 @@ function domain_blocking_add { fi ;; esac + rm $data } function ip_blocking_add { @@ -1968,6 +2028,7 @@ function ip_blocking_add { fi ;; esac + rm $data } function domain_blocking_remove { @@ -1994,6 +2055,7 @@ function domain_blocking_remove { fi ;; esac + rm $data } function ip_blocking_remove { @@ -2017,6 +2079,7 @@ function ip_blocking_remove { fi ;; esac + rm $data } function domain_blocking_show { @@ -2049,8 +2112,10 @@ function domain_blocking { 6 $"Back to main menu" on 2> $data sel=$? case $sel in - 1) break;; - 255) break;; + 1) rm $data + break;; + 255) rm $data + break;; esac case $(cat $data) in 1) domain_blocking_add;; @@ -2058,8 +2123,10 @@ function domain_blocking { 3) ip_blocking_add;; 4) ip_blocking_remove;; 5) domain_blocking_show;; - 6) break;; + 6) rm $data + break;; esac + rm $data done } @@ -2079,8 +2146,10 @@ function menu_users { 6 $"Back to main menu" on 2> $data sel=$? case $sel in - 1) break;; - 255) break;; + 1) rm $data + break;; + 255) rm $data + break;; esac case $(cat $data) in 1) add_user;; @@ -2088,8 +2157,10 @@ function menu_users { 3) change_password;; 4) change_ssh_public_key;; 5) reset_password_tries;; - 6) break;; + 6) rm $data + break;; esac + rm $data done } @@ -2172,16 +2243,20 @@ function menu_wifi { 5 $"Exit" on 2> $data sel=$? case $sel in - 1) break;; - 255) break;; + 1) rm $data + break;; + 255) rm $data + break;; esac case $(cat $data) in 1) wifi_enable;; 2) wifi_settings;; 3) wifi_edit_networks;; 4) hotspot_settings;; - 5) break;; + 5) rm $data + break;; esac + rm $data done } @@ -2256,8 +2331,10 @@ function menu_top_level { 22 $"Exit" on 2> $data sel=$? case $sel in - 1) exit 1;; - 255) exit 1;; + 1) rm $data + exit 1;; + 255) rm $data + exit 1;; esac please_wait case $(cat $data) in @@ -2287,8 +2364,10 @@ function menu_top_level { 19) check_for_updates;; 20) shut_down_system;; 21) restart_system;; - 22) break;; + 22) rm $data + break;; esac + rm $data done } diff --git a/src/freedombone-controlpanel-user b/src/freedombone-controlpanel-user index ea588d1c..894435aa 100755 --- a/src/freedombone-controlpanel-user +++ b/src/freedombone-controlpanel-user @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016 Bob Mottram +# Copyright (C) 2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -169,8 +169,10 @@ function add_to_mailing_list { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac LIST_NAME=$(cat $data | sed -n 1p) LIST_SUBJECT=$(cat $data | sed -n 2p) @@ -188,12 +190,14 @@ function add_to_mailing_list { if [ ${#LIST_NAME} -lt 2 ]; then dialog --title $"Add mailing list" \ --msgbox $"No mailing list name was given" 6 40 + rm $data return fi if [ ${#LIST_SUBJECT} -lt 2 ]; then if [ ${#LIST_EMAIL} -lt 2 ]; then dialog --title $"Add mailing list" \ --msgbox $"No mailing list subject or address was given" 6 40 + rm $data return fi fi @@ -204,6 +208,7 @@ function add_to_mailing_list { if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then dialog --title $"Add mailing list" \ --msgbox $"Unrecognised email address" 6 40 + rm $data return else ${PROJECT_NAME}-addlist -u $USER -l "$LIST_NAME" \ @@ -213,6 +218,7 @@ function add_to_mailing_list { dialog --title $"Add mailing list" \ --msgbox $"$LIST_NAME list was added" 6 40 + rm $data } function email_rule_address { @@ -227,8 +233,10 @@ function email_rule_address { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac RULE_EMAIL=$(cat $data | sed -n 1p) RULE_FOLDER=$(cat $data | sed -n 2p) @@ -245,16 +253,19 @@ function email_rule_address { if [ ${#RULE_EMAIL} -lt 2 ]; then dialog --title $"Create an email rule" \ --msgbox $"No email address was given" 6 40 + rm $data return fi if [ ${#RULE_FOLDER} -lt 2 ]; then dialog --title $"Create an email rule" \ --msgbox $"No folder name was given" 6 40 + rm $data return fi if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then dialog --title $"Create an email rule" \ --msgbox $"Unrecognised email address" 6 40 + rm $data return fi @@ -262,6 +273,7 @@ function email_rule_address { -g "$RULE_FOLDER" --public $RULE_PUBLIC dialog --title $"Create an email rule" \ --msgbox $"Email rule for $RULE_EMAIL was added" 6 40 + rm $data } function gpg_set_trust { @@ -281,8 +293,10 @@ function gpg_set_trust { 5 $"I trust ultimately" off 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac TRUST_LEVEL=$(cat $data) if [ ${TRUST_LEVEL} -ge 1 ] ; then @@ -296,6 +310,7 @@ function gpg_set_trust { fi fi fi + rm $data fi } @@ -311,8 +326,10 @@ function email_rule_subject { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac RULE_SUBJECT=$(cat $data | sed -n 1p) RULE_FOLDER=$(cat $data | sed -n 2p) @@ -329,11 +346,13 @@ function email_rule_subject { if [ ${#RULE_SUBJECT} -lt 2 ]; then dialog --title $"Create an email rule" \ --msgbox $"No subject text was given" 6 40 + rm $data return fi if [ ${#RULE_FOLDER} -lt 2 ]; then dialog --title $"Create an email rule" \ --msgbox $"No folder name was given" 6 40 + rm $data return fi @@ -341,6 +360,7 @@ function email_rule_subject { -g "$RULE_FOLDER" --public $RULE_PUBLIC dialog --title $"Create an email rule" \ --msgbox $"Email rule for subject '$RULE_SUBJECT' was added" 6 40 + rm $data } function block_unblock_email { @@ -355,8 +375,10 @@ function block_unblock_email { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac BLOCK_EMAIL=$(cat $data | sed -n 1p) BLOCK=$(cat $data | sed -n 2p) @@ -368,6 +390,7 @@ function block_unblock_email { if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then dialog --title "$blockstr" \ --msgbox $"Unrecognised email address" 6 40 + rm $data return fi if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then @@ -379,6 +402,7 @@ function block_unblock_email { dialog --title $"Unblock an email" \ --msgbox "Email from $BLOCK_EMAIL is now unblocked" 6 75 fi + rm $data } function block_unblock_subject { @@ -393,14 +417,17 @@ function block_unblock_subject { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac BLOCK_SUBJECT=$(cat $data | sed -n 1p) BLOCK=$(cat $data | sed -n 2p) if [ ${#BLOCK_SUBJECT} -lt 2 ]; then dialog --title "$blockstr" \ --msgbox $"No subject was given" 6 40 + rm $data return fi if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then @@ -412,6 +439,7 @@ function block_unblock_subject { dialog --title $"Unblock an email" \ --msgbox $"Email with subject $BLOCK_SUBJECT is now unblocked" 6 40 fi + rm $data } function show_gpg_key { @@ -530,6 +558,7 @@ function remove_gpg_key { fi ;; esac + rm $data } function add_ssh_key { @@ -568,6 +597,7 @@ function add_ssh_key { fi ;; esac + rm $data } function remove_ssh_key { @@ -590,6 +620,7 @@ function remove_ssh_key { fi ;; esac + rm $data } function smtp_proxy { @@ -631,8 +662,10 @@ function smtp_proxy { 2> $data sel=$? case $sel in - 1) return;; - 255) return;; + 1) rm $data + return;; + 255) rm $data + return;; esac SMTP_PROXY_ENABLE=$(cat $data | sed -n 1p) SMTP_PROXY_PROTOCOL=$(cat $data | sed -n 2p) @@ -654,6 +687,7 @@ function smtp_proxy { sed -i 's|set smtp_url|#set smtp_url|g' $MUTTRC_FILE fi fi + rm $data } function sign_gpg_key { @@ -682,6 +716,7 @@ function sign_gpg_key { fi ;; esac + rm $data } @@ -702,6 +737,7 @@ function gpg_key_trust { fi ;; esac + rm $data } function menu_encryption_keys { @@ -725,8 +761,10 @@ function menu_encryption_keys { 11 $"Back to main menu" on 2> $data sel=$? case $sel in - 1) break;; - 255) break;; + 1) rm $data + break;; + 255) rm $data + break;; esac case $(cat $data) in 1) show_gpg_key;; @@ -739,8 +777,10 @@ function menu_encryption_keys { 8) add_ssh_key;; 9) remove_ssh_key;; 10) gpg_key_trust;; - 11) break;; + 11) rm $data + break;; esac + rm $data done } @@ -761,8 +801,10 @@ function menu_email { 7 $"Back to main menu" on 2> $data sel=$? case $sel in - 1) break;; - 255) break;; + 1) rm $data + break;; + 255) rm $data + break;; esac case $(cat $data) in 1) add_to_mailing_list;; @@ -771,8 +813,10 @@ function menu_email { 4) email_rule_subject;; 5) block_unblock_email;; 6) block_unblock_subject;; - 7) break;; + 7) rm $data + break;; esac + rm $data done } @@ -857,8 +901,10 @@ function menu_top_level { 9 $"Log out" on 2> $data sel=$? case $sel in - 1) exit 1;; - 255) exit 1;; + 1) rm $data + exit 1;; + 255) rm $data + exit 1;; esac case $(cat $data) in 1) mutt;; @@ -868,9 +914,11 @@ function menu_top_level { 5) menu_encryption_keys;; 6) smtp_proxy;; 7) menu_admin;; - 8) break;; + 8) rm $data + break;; 9) kill -HUP `pgrep -s 0 -o`;; esac + rm $data done } From ee1330f44234f8f7da0cc30c8e9b69ae9bdd98a3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Jan 2018 18:35:39 +0000 Subject: [PATCH 24/24] Update year --- src/freedombone | 2 +- src/freedombone-app-akaunting | 2 +- src/freedombone-app-cryptpad | 2 +- src/freedombone-app-dokuwiki | 2 +- src/freedombone-app-etherpad | 2 +- src/freedombone-app-friendica | 2 +- src/freedombone-app-gnusocial | 2 +- src/freedombone-app-gogs | 2 +- src/freedombone-app-hubzilla | 2 +- src/freedombone-app-icecast | 2 +- src/freedombone-app-jitsi | 2 +- src/freedombone-app-kanboard | 2 +- src/freedombone-app-keyserver | 2 +- src/freedombone-app-koel | 2 +- src/freedombone-app-lychee | 2 +- src/freedombone-app-mailpile | 2 +- src/freedombone-app-matrix | 2 +- src/freedombone-app-mediagoblin | 2 +- src/freedombone-app-movim | 2 +- src/freedombone-app-nextcloud | 2 +- src/freedombone-app-peertube | 2 +- src/freedombone-app-pelican | 2 +- src/freedombone-app-postactiv | 2 +- src/freedombone-app-profanity | 2 +- src/freedombone-app-riot | 2 +- src/freedombone-app-rss | 2 +- src/freedombone-app-scuttlebot | 2 +- src/freedombone-app-searx | 2 +- src/freedombone-app-tahoelafs | 2 +- src/freedombone-app-vpn | 2 +- src/freedombone-app-wekan | 2 +- src/freedombone-base-email | 2 +- src/freedombone-config | 2 +- src/freedombone-freedns | 2 +- src/freedombone-keydrive | 2 +- src/freedombone-mesh-batman | 2 +- src/freedombone-pass | 2 +- src/freedombone-prepare-scripts | 2 +- src/freedombone-upgrade | 2 +- src/freedombone-utils-database | 2 +- src/freedombone-utils-firewall | 2 +- src/freedombone-utils-gnusocialtools | 2 +- src/freedombone-utils-gpg | 2 +- src/freedombone-utils-guile | 2 +- src/freedombone-utils-meteor | 2 +- src/freedombone-utils-mongodb | 2 +- src/freedombone-utils-nodejs | 2 +- src/freedombone-utils-postgresql | 2 +- src/freedombone-utils-setup | 2 +- src/freedombone-utils-ssh | 2 +- src/freedombone-utils-web | 2 +- 51 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/freedombone b/src/freedombone index 3fd8463b..5e69cc2b 100755 --- a/src/freedombone +++ b/src/freedombone @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-akaunting b/src/freedombone-app-akaunting index 0647c1b0..25ac1113 100755 --- a/src/freedombone-app-akaunting +++ b/src/freedombone-app-akaunting @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-cryptpad b/src/freedombone-app-cryptpad index ea74bc12..1a3d7c4b 100755 --- a/src/freedombone-app-cryptpad +++ b/src/freedombone-app-cryptpad @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-dokuwiki b/src/freedombone-app-dokuwiki index cc95c5f5..d8668dc1 100755 --- a/src/freedombone-app-dokuwiki +++ b/src/freedombone-app-dokuwiki @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-etherpad b/src/freedombone-app-etherpad index eea751a1..bf18890b 100755 --- a/src/freedombone-app-etherpad +++ b/src/freedombone-app-etherpad @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-friendica b/src/freedombone-app-friendica index 2789c581..37464648 100755 --- a/src/freedombone-app-friendica +++ b/src/freedombone-app-friendica @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index 1bd7f368..efd48bd2 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs index cce16d2d..b22e4697 100755 --- a/src/freedombone-app-gogs +++ b/src/freedombone-app-gogs @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-hubzilla b/src/freedombone-app-hubzilla index ed5a81b7..0f824c47 100755 --- a/src/freedombone-app-hubzilla +++ b/src/freedombone-app-hubzilla @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-icecast b/src/freedombone-app-icecast index 8afd10b1..8f0ab535 100755 --- a/src/freedombone-app-icecast +++ b/src/freedombone-app-icecast @@ -17,7 +17,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-jitsi b/src/freedombone-app-jitsi index 3348f9df..618618c2 100755 --- a/src/freedombone-app-jitsi +++ b/src/freedombone-app-jitsi @@ -15,7 +15,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-kanboard b/src/freedombone-app-kanboard index 64a0b791..3d7c2dd7 100755 --- a/src/freedombone-app-kanboard +++ b/src/freedombone-app-kanboard @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-keyserver b/src/freedombone-app-keyserver index 4688a18f..e4325b7e 100755 --- a/src/freedombone-app-keyserver +++ b/src/freedombone-app-keyserver @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-koel b/src/freedombone-app-koel index f38a2ca3..0e588dc9 100755 --- a/src/freedombone-app-koel +++ b/src/freedombone-app-koel @@ -14,7 +14,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-lychee b/src/freedombone-app-lychee index 727072bf..9cfad6a2 100755 --- a/src/freedombone-app-lychee +++ b/src/freedombone-app-lychee @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-mailpile b/src/freedombone-app-mailpile index e7682e20..7f7dfa69 100755 --- a/src/freedombone-app-mailpile +++ b/src/freedombone-app-mailpile @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index 31d8c1af..60b40cc2 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -20,7 +20,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-mediagoblin b/src/freedombone-app-mediagoblin index fa1bba52..945ad9b2 100755 --- a/src/freedombone-app-mediagoblin +++ b/src/freedombone-app-mediagoblin @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-movim b/src/freedombone-app-movim index 52f0bb0b..e9e5163a 100755 --- a/src/freedombone-app-movim +++ b/src/freedombone-app-movim @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-nextcloud b/src/freedombone-app-nextcloud index 34ee4b7d..fd33e554 100755 --- a/src/freedombone-app-nextcloud +++ b/src/freedombone-app-nextcloud @@ -15,7 +15,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-peertube b/src/freedombone-app-peertube index 21b05612..604ba56c 100755 --- a/src/freedombone-app-peertube +++ b/src/freedombone-app-peertube @@ -16,7 +16,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-pelican b/src/freedombone-app-pelican index 72363d24..da8bda97 100755 --- a/src/freedombone-app-pelican +++ b/src/freedombone-app-pelican @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv index 327c3b68..ff2a8335 100755 --- a/src/freedombone-app-postactiv +++ b/src/freedombone-app-postactiv @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-profanity b/src/freedombone-app-profanity index ba2cf822..d602aa50 100755 --- a/src/freedombone-app-profanity +++ b/src/freedombone-app-profanity @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-riot b/src/freedombone-app-riot index bd17550f..1b1b423b 100755 --- a/src/freedombone-app-riot +++ b/src/freedombone-app-riot @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index 7cc02942..30386b91 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-scuttlebot b/src/freedombone-app-scuttlebot index 9022296d..0c26fb99 100755 --- a/src/freedombone-app-scuttlebot +++ b/src/freedombone-app-scuttlebot @@ -14,7 +14,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-searx b/src/freedombone-app-searx index 6edd4aa8..41f4f04a 100755 --- a/src/freedombone-app-searx +++ b/src/freedombone-app-searx @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-tahoelafs b/src/freedombone-app-tahoelafs index 458f1e05..b8b795d5 100755 --- a/src/freedombone-app-tahoelafs +++ b/src/freedombone-app-tahoelafs @@ -15,7 +15,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-vpn b/src/freedombone-app-vpn index 94af1810..1aa183f5 100755 --- a/src/freedombone-app-vpn +++ b/src/freedombone-app-vpn @@ -16,7 +16,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-app-wekan b/src/freedombone-app-wekan index 48672a3f..75c8c506 100755 --- a/src/freedombone-app-wekan +++ b/src/freedombone-app-wekan @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-base-email b/src/freedombone-base-email index 055482d1..c15b2958 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-config b/src/freedombone-config index 3c6d4c9d..06bd15d3 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -14,7 +14,7 @@ # License # ======= # -# Copyright (C) 2015-2017 Bob Mottram +# Copyright (C) 2015-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-freedns b/src/freedombone-freedns index 9d0e2342..3d68ac1f 100755 --- a/src/freedombone-freedns +++ b/src/freedombone-freedns @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-keydrive b/src/freedombone-keydrive index ebc62a59..4a01b9ee 100755 --- a/src/freedombone-keydrive +++ b/src/freedombone-keydrive @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2015-2017 Bob Mottram +# Copyright (C) 2015-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-mesh-batman b/src/freedombone-mesh-batman index 6202bb98..141c48e0 100755 --- a/src/freedombone-mesh-batman +++ b/src/freedombone-mesh-batman @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2015-2017 Bob Mottram +# Copyright (C) 2015-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-pass b/src/freedombone-pass index 2682456f..a0ceee80 100755 --- a/src/freedombone-pass +++ b/src/freedombone-pass @@ -22,7 +22,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-prepare-scripts b/src/freedombone-prepare-scripts index 625ef296..e0ca2310 100755 --- a/src/freedombone-prepare-scripts +++ b/src/freedombone-prepare-scripts @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 08e8abae..52dd9402 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2015-2017 Bob Mottram +# Copyright (C) 2015-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-database b/src/freedombone-utils-database index 1569b8ce..6afebc1c 100755 --- a/src/freedombone-utils-database +++ b/src/freedombone-utils-database @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-firewall b/src/freedombone-utils-firewall index 733278fd..8c429973 100755 --- a/src/freedombone-utils-firewall +++ b/src/freedombone-utils-firewall @@ -15,7 +15,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index a84c756a..74077e61 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-gpg b/src/freedombone-utils-gpg index 895b132b..0553c036 100755 --- a/src/freedombone-utils-gpg +++ b/src/freedombone-utils-gpg @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016-2017 Bob Mottram +# Copyright (C) 2016-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-guile b/src/freedombone-utils-guile index 3f22334a..51a25cf9 100755 --- a/src/freedombone-utils-guile +++ b/src/freedombone-utils-guile @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-meteor b/src/freedombone-utils-meteor index 1b14bea6..d60d6def 100755 --- a/src/freedombone-utils-meteor +++ b/src/freedombone-utils-meteor @@ -14,7 +14,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-mongodb b/src/freedombone-utils-mongodb index 10c394ba..d78d9909 100755 --- a/src/freedombone-utils-mongodb +++ b/src/freedombone-utils-mongodb @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index a73ca4dd..c3cc8486 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-postgresql b/src/freedombone-utils-postgresql index 676eef6d..8c81a0fe 100755 --- a/src/freedombone-utils-postgresql +++ b/src/freedombone-utils-postgresql @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2017 Bob Mottram +# Copyright (C) 2017-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index eec1df05..cf80486f 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-ssh b/src/freedombone-utils-ssh index 8fed11f8..bab31578 100755 --- a/src/freedombone-utils-ssh +++ b/src/freedombone-utils-ssh @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index 77abec99..b4f4349a 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2014-2017 Bob Mottram +# Copyright (C) 2014-2018 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by