Ver código fonte

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 anos atrás
pai
commit
f85c6a9b5b
65 arquivos alterados com 344 adições e 622 exclusões
  1. 7
    1
      doc/EN/debianinstall.org
  2. BIN
      man/freedombone-client.1.gz
  3. 1
    1
      src/freedombone
  4. 1
    1
      src/freedombone-app-akaunting
  5. 1
    1
      src/freedombone-app-cryptpad
  6. 1
    1
      src/freedombone-app-dokuwiki
  7. 1
    1
      src/freedombone-app-etherpad
  8. 1
    1
      src/freedombone-app-friendica
  9. 1
    1
      src/freedombone-app-gnusocial
  10. 1
    1
      src/freedombone-app-gogs
  11. 1
    1
      src/freedombone-app-hubzilla
  12. 1
    1
      src/freedombone-app-icecast
  13. 1
    1
      src/freedombone-app-jitsi
  14. 1
    1
      src/freedombone-app-kanboard
  15. 1
    1
      src/freedombone-app-keyserver
  16. 1
    1
      src/freedombone-app-koel
  17. 1
    1
      src/freedombone-app-lychee
  18. 1
    1
      src/freedombone-app-mailpile
  19. 1
    1
      src/freedombone-app-matrix
  20. 1
    1
      src/freedombone-app-mediagoblin
  21. 1
    1
      src/freedombone-app-movim
  22. 1
    1
      src/freedombone-app-nextcloud
  23. 1
    1
      src/freedombone-app-peertube
  24. 1
    1
      src/freedombone-app-pelican
  25. 25
    1
      src/freedombone-app-pleroma
  26. 1
    1
      src/freedombone-app-postactiv
  27. 1
    1
      src/freedombone-app-profanity
  28. 1
    1
      src/freedombone-app-riot
  29. 24
    13
      src/freedombone-app-rss
  30. 1
    1
      src/freedombone-app-scuttlebot
  31. 1
    1
      src/freedombone-app-searx
  32. 0
    381
      src/freedombone-app-smilodon
  33. 1
    1
      src/freedombone-app-tahoelafs
  34. 1
    1
      src/freedombone-app-vpn
  35. 1
    1
      src/freedombone-app-wekan
  36. 5
    1
      src/freedombone-app-xmpp
  37. 1
    1
      src/freedombone-base-email
  38. 1
    13
      src/freedombone-client
  39. 1
    1
      src/freedombone-config
  40. 115
    36
      src/freedombone-controlpanel
  41. 72
    24
      src/freedombone-controlpanel-user
  42. 1
    1
      src/freedombone-freedns
  43. 1
    1
      src/freedombone-image-customise
  44. 1
    1
      src/freedombone-keydrive
  45. 1
    1
      src/freedombone-mesh-batman
  46. 1
    1
      src/freedombone-pass
  47. 1
    1
      src/freedombone-prepare-scripts
  48. 7
    1
      src/freedombone-upgrade
  49. 16
    91
      src/freedombone-utils-backup
  50. 1
    1
      src/freedombone-utils-database
  51. 1
    1
      src/freedombone-utils-firewall
  52. 1
    1
      src/freedombone-utils-gnusocialtools
  53. 1
    1
      src/freedombone-utils-gpg
  54. 1
    1
      src/freedombone-utils-guile
  55. 1
    1
      src/freedombone-utils-meteor
  56. 1
    1
      src/freedombone-utils-mongodb
  57. 1
    1
      src/freedombone-utils-nodejs
  58. 1
    1
      src/freedombone-utils-onion
  59. 1
    1
      src/freedombone-utils-postgresql
  60. 5
    2
      src/freedombone-utils-setup
  61. 1
    1
      src/freedombone-utils-ssh
  62. 1
    1
      src/freedombone-utils-web
  63. 1
    1
      tests/check-libs-owner.sh
  64. 2
    2
      tests/output.sh
  65. 14
    5
      website/EN/debianinstall.html

+ 7
- 1
doc/EN/debianinstall.org Ver arquivo

28
 cd freedombone
28
 cd freedombone
29
 git checkout stretch
29
 git checkout stretch
30
 make install
30
 make install
31
-freedombone makeconfig
31
+freedombone menuconfig (or freedombone menuconfig-onion)
32
 #+END_SRC
32
 #+END_SRC
33
 
33
 
34
 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.
34
 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.
35
+
36
+Once installed you can then log in from another system with:
37
+
38
+#+BEGIN_SRC bash
39
+ssh yourusername@freedombone.local -p 2222
40
+#+END_SRC

BIN
man/freedombone-client.1.gz Ver arquivo


+ 1
- 1
src/freedombone Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-akaunting Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-cryptpad Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-dokuwiki Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-etherpad Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-friendica Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-gnusocial Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-gogs Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-hubzilla Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-icecast Ver arquivo

17
 # License
17
 # License
18
 # =======
18
 # =======
19
 #
19
 #
20
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
20
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
21
 #
21
 #
22
 # This program is free software: you can redistribute it and/or modify
22
 # This program is free software: you can redistribute it and/or modify
23
 # it under the terms of the GNU Affero General Public License as published by
23
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-jitsi Ver arquivo

15
 # License
15
 # License
16
 # =======
16
 # =======
17
 #
17
 #
18
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
18
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
19
 #
19
 #
20
 # This program is free software: you can redistribute it and/or modify
20
 # This program is free software: you can redistribute it and/or modify
21
 # it under the terms of the GNU Affero General Public License as published by
21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-kanboard Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-keyserver Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-koel Ver arquivo

14
 # License
14
 # License
15
 # =======
15
 # =======
16
 #
16
 #
17
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
17
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
18
 #
18
 #
19
 # This program is free software: you can redistribute it and/or modify
19
 # This program is free software: you can redistribute it and/or modify
20
 # it under the terms of the GNU Affero General Public License as published by
20
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-lychee Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-mailpile Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-matrix Ver arquivo

20
 # License
20
 # License
21
 # =======
21
 # =======
22
 #
22
 #
23
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
23
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
24
 #
24
 #
25
 # This program is free software: you can redistribute it and/or modify
25
 # This program is free software: you can redistribute it and/or modify
26
 # it under the terms of the GNU Affero General Public License as published by
26
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-mediagoblin Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-movim Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-nextcloud Ver arquivo

15
 # License
15
 # License
16
 # =======
16
 # =======
17
 #
17
 #
18
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
18
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
19
 #
19
 #
20
 # This program is free software: you can redistribute it and/or modify
20
 # This program is free software: you can redistribute it and/or modify
21
 # it under the terms of the GNU Affero General Public License as published by
21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-peertube Ver arquivo

16
 # License
16
 # License
17
 # =======
17
 # =======
18
 #
18
 #
19
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
19
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
20
 #
20
 #
21
 # This program is free software: you can redistribute it and/or modify
21
 # This program is free software: you can redistribute it and/or modify
22
 # it under the terms of the GNU Affero General Public License as published by
22
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-pelican Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 25
- 1
src/freedombone-app-pleroma Ver arquivo

875
     if [[ $ONION_ONLY == "no" ]]; then
875
     if [[ $ONION_ONLY == "no" ]]; then
876
         function_check nginx_http_redirect
876
         function_check nginx_http_redirect
877
         nginx_http_redirect $PLEROMA_DOMAIN_NAME "index index.html"
877
         nginx_http_redirect $PLEROMA_DOMAIN_NAME "index index.html"
878
+        echo '' >> $pleroma_nginx_site
879
+        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
880
+        echo '' >> $pleroma_nginx_site
878
         echo 'server {' >> $pleroma_nginx_site
881
         echo 'server {' >> $pleroma_nginx_site
879
         echo '  listen 443 ssl;' >> $pleroma_nginx_site
882
         echo '  listen 443 ssl;' >> $pleroma_nginx_site
880
         echo '  listen [::]:443 ssl;' >> $pleroma_nginx_site
883
         echo '  listen [::]:443 ssl;' >> $pleroma_nginx_site
902
         echo '  location / {' >> $pleroma_nginx_site
905
         echo '  location / {' >> $pleroma_nginx_site
903
         function_check nginx_limits
906
         function_check nginx_limits
904
         nginx_limits $PLEROMA_DOMAIN_NAME '15m'
907
         nginx_limits $PLEROMA_DOMAIN_NAME '15m'
908
+        echo '    proxy_http_version 1.1;' >> $pleroma_nginx_site
909
+        echo '    proxy_set_header Upgrade $http_upgrade;' >> $pleroma_nginx_site
910
+        echo '    proxy_set_header Connection "upgrade";' >> $pleroma_nginx_site
911
+        echo "    proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
912
+        echo '  }' >> $pleroma_nginx_site
913
+        echo '' >> $pleroma_nginx_site
914
+        echo '  location /proxy {' >> $pleroma_nginx_site
915
+        nginx_limits $PLEROMA_DOMAIN_NAME '15m'
916
+        echo '    proxy_cache pleroma_media_cache;' >> $pleroma_nginx_site
917
+        echo '    proxy_cache_lock on;' >> $pleroma_nginx_site
905
         echo "    proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
918
         echo "    proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
906
         echo '  }' >> $pleroma_nginx_site
919
         echo '  }' >> $pleroma_nginx_site
907
         echo '  # include snippets/well-known.conf;' >> $pleroma_nginx_site
920
         echo '  # include snippets/well-known.conf;' >> $pleroma_nginx_site
908
         echo '}' >> $pleroma_nginx_site
921
         echo '}' >> $pleroma_nginx_site
909
     else
922
     else
910
-        echo -n '' > $pleroma_nginx_site
923
+        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
924
+        echo '' >> $pleroma_nginx_site
911
     fi
925
     fi
912
     echo 'server {' >> $pleroma_nginx_site
926
     echo 'server {' >> $pleroma_nginx_site
913
     echo "    listen 127.0.0.1:$PLEROMA_ONION_PORT default_server;" >> $pleroma_nginx_site
927
     echo "    listen 127.0.0.1:$PLEROMA_ONION_PORT default_server;" >> $pleroma_nginx_site
929
     echo '  location / {' >> $pleroma_nginx_site
943
     echo '  location / {' >> $pleroma_nginx_site
930
     function_check nginx_limits
944
     function_check nginx_limits
931
     nginx_limits $PLEROMA_DOMAIN_NAME '15m'
945
     nginx_limits $PLEROMA_DOMAIN_NAME '15m'
946
+    echo '      proxy_http_version 1.1;' >> $pleroma_nginx_site
947
+    echo '      proxy_set_header Upgrade $http_upgrade;' >> $pleroma_nginx_site
948
+    echo '      proxy_set_header Connection "upgrade";' >> $pleroma_nginx_site
949
+    echo "      proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
950
+    echo '  }' >> $pleroma_nginx_site
951
+    echo '' >> $pleroma_nginx_site
952
+    echo '  location /proxy {' >> $pleroma_nginx_site
953
+    nginx_limits $PLEROMA_DOMAIN_NAME '15m'
954
+    echo '    proxy_cache pleroma_media_cache;' >> $pleroma_nginx_site
955
+    echo '    proxy_cache_lock on;' >> $pleroma_nginx_site
932
     echo "    proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
956
     echo "    proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
933
     echo '  }' >> $pleroma_nginx_site
957
     echo '  }' >> $pleroma_nginx_site
934
     echo '  # include snippets/well-known.conf;' >> $pleroma_nginx_site
958
     echo '  # include snippets/well-known.conf;' >> $pleroma_nginx_site

+ 1
- 1
src/freedombone-app-postactiv Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-profanity Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-riot Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 24
- 13
src/freedombone-app-rss Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by
149
 
149
 
150
 function backup_local_rss {
150
 function backup_local_rss {
151
     if [ -d /etc/share/tt-rss ]; then
151
     if [ -d /etc/share/tt-rss ]; then
152
-        RSS_READER_DOMAIN_NAME=$(get_completion_param "rss reader domain")
153
-
154
         echo $"Backing up ttrss"
152
         echo $"Backing up ttrss"
155
 
153
 
154
+        function_check get_mariadb_password
155
+        get_mariadb_password
156
+
156
         function_check backup_database_to_usb
157
         function_check backup_database_to_usb
157
         backup_database_to_usb ttrss
158
         backup_database_to_usb ttrss
158
 
159
 
165
 function restore_local_rss {
166
 function restore_local_rss {
166
     temp_restore_dir=/root/tempttrss
167
     temp_restore_dir=/root/tempttrss
167
 
168
 
168
-    function_check rss_create_database
169
-    rss_create_database
169
+    function_check get_mariadb_password
170
+    get_mariadb_password
170
 
171
 
171
-    restore_database ttrss ${RSS_READER_DOMAIN_NAME}
172
+    function_check restore_database
173
+    restore_database ttrss
172
 
174
 
173
     if [ -d /etc/share/tt-rss ]; then
175
     if [ -d /etc/share/tt-rss ]; then
174
         if [ -d $temp_restore_dir/etc/share/tt-rss ]; then
176
         if [ -d $temp_restore_dir/etc/share/tt-rss ]; then
176
                 rm -rf /etc/share/tt-rss
178
                 rm -rf /etc/share/tt-rss
177
                 mv $temp_restore_dir/etc/share/tt-rss /etc/share/
179
                 mv $temp_restore_dir/etc/share/tt-rss /etc/share/
178
             else
180
             else
181
+                if [ ! -d /etc/share/tt-rss ]; then
182
+                    mkdir -p /etc/share/tt-rss
183
+                fi
179
                 cp -r $temp_restore_dir/* /etc/share/tt-rss/
184
                 cp -r $temp_restore_dir/* /etc/share/tt-rss/
180
             fi
185
             fi
181
             if [ ! "$?" = "0" ]; then
186
             if [ ! "$?" = "0" ]; then
216
 function backup_remote_rss {
221
 function backup_remote_rss {
217
     if [ -d /etc/share/tt-rss ]; then
222
     if [ -d /etc/share/tt-rss ]; then
218
         function_check suspend_site
223
         function_check suspend_site
219
-        suspend_site ${RSS_READER_DOMAIN_NAME}
224
+        suspend_site ttrss
225
+
226
+        function_check get_mariadb_password
227
+        get_mariadb_password
220
 
228
 
221
         function_check backup_database_to_friend
229
         function_check backup_database_to_friend
222
         backup_database_to_friend ttrss
230
         backup_database_to_friend ttrss
229
         function_check restart_site
237
         function_check restart_site
230
         restart_site
238
         restart_site
231
     else
239
     else
232
-        echo $"RSS reader domain specified but not found in /etc/share/ttrss}"
240
+        echo $"/etc/share/tt-rss directory not found}"
241
+        exit 783532
233
     fi
242
     fi
234
 }
243
 }
235
 
244
 
237
     temp_restore_dir=/root/tempttrss
246
     temp_restore_dir=/root/tempttrss
238
     if grep -q "rss reader domain" $COMPLETION_FILE; then
247
     if grep -q "rss reader domain" $COMPLETION_FILE; then
239
         echo $"Restoring ttrss"
248
         echo $"Restoring ttrss"
240
-        function_check restore_database_from_friend
241
-
242
-        function_check rss_create_database
243
-        rss_create_database
249
+        function_check get_mariadb_password
250
+        get_mariadb_password
244
 
251
 
245
-        restore_database_from_friend ttrss ${RSS_READER_DOMAIN_NAME}
252
+        function_check restore_database_from_friend
253
+        restore_database_from_friend ttrss
246
 
254
 
247
         if [ -d /etc/share/tt-rss ]; then
255
         if [ -d /etc/share/tt-rss ]; then
248
             if [ -d $temp_restore_dir/etc/share/tt-rss ]; then
256
             if [ -d $temp_restore_dir/etc/share/tt-rss ]; then
249
                 rm -rf /etc/share/tt-rss
257
                 rm -rf /etc/share/tt-rss
250
                 mv $temp_restore_dir/etc/share/tt-rss /etc/share/
258
                 mv $temp_restore_dir/etc/share/tt-rss /etc/share/
251
             else
259
             else
260
+                if [ ! -d /etc/share/tt-rss ]; then
261
+                    mkdir -p /etc/share/tt-rss
262
+                fi
252
                 cp -r $temp_restore_dir/* /etc/share/tt-rss/
263
                 cp -r $temp_restore_dir/* /etc/share/tt-rss/
253
             fi
264
             fi
254
             if [ ! "$?" = "0" ]; then
265
             if [ ! "$?" = "0" ]; then

+ 1
- 1
src/freedombone-app-scuttlebot Ver arquivo

14
 # License
14
 # License
15
 # =======
15
 # =======
16
 #
16
 #
17
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
17
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
18
 #
18
 #
19
 # This program is free software: you can redistribute it and/or modify
19
 # This program is free software: you can redistribute it and/or modify
20
 # it under the terms of the GNU Affero General Public License as published by
20
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-searx Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 0
- 381
src/freedombone-app-smilodon Ver arquivo

1
-#!/bin/bash
2
-#
3
-# .---.                  .              .
4
-# |                      |              |
5
-# |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.
6
-# |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'
7
-# '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'
8
-#
9
-#                    Freedom in the Cloud
10
-#
11
-# Smilodon ActivityPub app
12
-#
13
-# License
14
-# =======
15
-#
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
17
-#
18
-# This program is free software: you can redistribute it and/or modify
19
-# it under the terms of the GNU Affero General Public License as published by
20
-# the Free Software Foundation, either version 3 of the License, or
21
-# (at your option) any later version.
22
-#
23
-# This program is distributed in the hope that it will be useful,
24
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
-# GNU Affero General Public License for more details.
27
-#
28
-# You should have received a copy of the GNU Affero General Public License
29
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
-
31
-VARIANTS=''
32
-
33
-IN_DEFAULT_INSTALL=0
34
-SHOW_ON_ABOUT=1
35
-SHOW_ICANN_ADDRESS_ON_ABOUT=0
36
-
37
-SMILODON_REPO="https://github.com/bashrc/smilodon"
38
-SMILODON_COMMIT='18c91b84737fbb1a106d3c495730ac3261aac335'
39
-SMILODON_ADMIN_PASSWORD=
40
-SMILODON_ONION_PORT=8054
41
-SMILODON_PATH=/etc/smilodon
42
-SMILODON_SECRET_KEY=
43
-
44
-smilodon_variables=(SMILODON_REPO
45
-                    SMILODON_ADMIN_PASSWORD
46
-                    USB_MOUNT
47
-                    SMILODON_SECRET_KEY
48
-                    MY_EMAIL_ADDRESS
49
-                    MY_USERNAME)
50
-
51
-function logging_on_smilodon {
52
-    echo -n ''
53
-}
54
-
55
-function logging_off_smilodon {
56
-    echo -n ''
57
-}
58
-
59
-function remove_user_smilodon {
60
-    remove_username="$1"
61
-}
62
-
63
-function add_user_smilodon {
64
-    new_username="$1"
65
-    new_user_password="$2"
66
-    echo '0'
67
-}
68
-
69
-function install_interactive_smilodon {
70
-    echo -n ''
71
-    APP_INSTALLED=1
72
-}
73
-
74
-function change_password_smilodon {
75
-    curr_username="$1"
76
-    new_user_password="$2"
77
-
78
-    #${PROJECT_NAME}-pass -u "$curr_username" -a smilodon -p "$new_user_password"
79
-}
80
-
81
-function smilodon_create_database {
82
-    if [ ! $SMILODON_ADMIN_PASSWORD ]; then
83
-        return
84
-    fi
85
-
86
-    function_check create_database_mongodb
87
-    create_database_mongodb smilodon "$SMILODON_ADMIN_PASSWORD" smilodon
88
-}
89
-
90
-function reconfigure_smilodon {
91
-    echo -n ''
92
-}
93
-
94
-function upgrade_smilodon {
95
-    CURR_SMILODON_COMMIT=$(get_completion_param "smilodon commit")
96
-    if [[ "$CURR_SMILODON_COMMIT" == "$SMILODON_COMMIT" ]]; then
97
-        return
98
-    fi
99
-
100
-    if [[ $(app_is_installed smilodon) == "1" ]]; then
101
-        systemctl stop smilodon
102
-        function_check set_repo_commit
103
-        set_repo_commit $SMILODON_PATH "smilodon commit" "$SMILODON_COMMIT" $SMILODON_REPO
104
-        chown -R smilodon:smilodon $SMILODON_PATH
105
-        systemctl start smilodon
106
-    fi
107
-
108
-}
109
-
110
-function backup_local_smilodon {
111
-    if [ ! -d $SMILODON_PATH ]; then
112
-        return
113
-    fi
114
-
115
-    systemctl stop smilodon
116
-
117
-    USE_MONGODB=1
118
-    function_check backup_database_to_usb
119
-    backup_database_to_usb smilodon
120
-
121
-    backup_directory_to_usb $SMILODON_PATH smilodon
122
-
123
-    systemctl start smilodon
124
-}
125
-
126
-function restore_local_smilodon {
127
-    temp_restore_dir=/root/tempsmilodon
128
-
129
-    systemctl stop smilodon
130
-
131
-    function_check smilodon_create_database
132
-    smilodon_create_database
133
-
134
-    USE_MONGODB=1
135
-    restore_database smilodon
136
-
137
-    if [ -d ${SMILODON_PATH} ]; then
138
-        if [ -d $temp_restore_dir${SMILODON_PATH} ]; then
139
-            if [ -d $temp_restore_dir${SMILODON_PATH} ]; then
140
-                rm -rf ${SMILODON_PATH}
141
-                mv $temp_restore_dir$SMILODON_PATH ${SMILODON_PATH}/
142
-            else
143
-                cp -r $temp_restore_dir/* ${SMILODON_PATH}/
144
-            fi
145
-            if [ ! "$?" = "0" ]; then
146
-                function_check backup_unmount_drive
147
-                backup_unmount_drive
148
-                systemctl start smilodon
149
-                exit 528823
150
-            fi
151
-            chown -R smilodon:smilodon ${SMILODON_PATH}
152
-        fi
153
-    fi
154
-
155
-    if [ -d $USB_MOUNT/backup/smilodon ]; then
156
-        chown -R smilodon:smilodon ${SMILODON_PATH}
157
-        if [ -d $temp_restore_dir ]; then
158
-            rm -rf $temp_restore_dir
159
-        fi
160
-    fi
161
-
162
-    systemctl start smilodon
163
-}
164
-
165
-function backup_remote_smilodon {
166
-    if [ -d $SMILODON_PATH ]; then
167
-        function_check suspend_site
168
-        suspend_site smilodon
169
-
170
-        systemctl stop smilodon
171
-
172
-        USE_MONGODB=1
173
-        function_check backup_database_to_friend
174
-        backup_database_to_friend smilodon
175
-
176
-        function_check backup_directory_to_friend
177
-        backup_directory_to_friend $SMILODON_PATH smilodon
178
-
179
-        systemctl start smilodon
180
-
181
-        function_check restart_site
182
-        restart_site
183
-    else
184
-        echo $"Smilodon domain specified but not found in $SMILODON_PATH"
185
-    fi
186
-}
187
-
188
-function restore_remote_smilodon {
189
-    temp_restore_dir=/root/tempsmilodon
190
-    if grep -q "smilodon domain" $COMPLETION_FILE; then
191
-        echo $"Restoring smilodon"
192
-        systemctl stop smilodon
193
-
194
-        function_check restore_database_from_friend
195
-
196
-        function_check smilodon_create_database
197
-        smilodon_create_database
198
-
199
-        USE_MONGODB=1
200
-        restore_database_from_friend smilodon
201
-
202
-        if [ -d $SMILODON_PATH ]; then
203
-            if [ -d $temp_restore_dir$SMILODON_PATH ]; then
204
-                rm -rf $SMILODON_PATH
205
-                mv $temp_restore_dir$SMILODON_PATH ${SMILODON_PATH}/
206
-            else
207
-                cp -r $temp_restore_dir/* ${SMILODON_PATH}/
208
-            fi
209
-            if [ ! "$?" = "0" ]; then
210
-                systemctl start smilodon
211
-                exit 6391643
212
-            fi
213
-        fi
214
-
215
-        if [ -d $SERVER_DIRECTORY/backup/smilodon ]; then
216
-            chown -R smilodon:smilodon ${SMILODON_PATH}
217
-        fi
218
-        if [ -d /root/tempsmilodon ]; then
219
-            rm -rf /root/tempsmilodon
220
-        fi
221
-
222
-        systemctl start smilodon
223
-
224
-        echo $"Restore of smilodon complete"
225
-    fi
226
-}
227
-
228
-function remove_smilodon {
229
-    nginx_dissite smilodon
230
-
231
-    systemctl stop smilodon
232
-    systemctl disable smilodon
233
-    rm /etc/systemd/system/smilodon.service
234
-
235
-    function_check remove_onion_service
236
-    remove_onion_service smilodon ${SMILODON_ONION_PORT}
237
-    if [ -f /etc/nginx/sites-available/smilodon ]; then
238
-        rm /etc/nginx/sites-available/smilodon
239
-    fi
240
-
241
-    groupdel -f smilodon
242
-    userdel -r smilodon
243
-
244
-    if [ -d $SMILODON_PATH ]; then
245
-        rm -rf $SMILODON_PATH
246
-    fi
247
-
248
-    function_check remove_mongodb_user
249
-    remove_mongodb_user smilodon
250
-
251
-    function_check drop_database_mongodb
252
-    drop_database_mongodb smilodon
253
-
254
-    function_check remove_mongodb
255
-    remove_mongodb smilodon
256
-
257
-    remove_completion_param install_smilodon
258
-    sed -i '/smilodon/d' $COMPLETION_FILE
259
-}
260
-
261
-function install_smilodon {
262
-    apt-get -yq install python3-pip
263
-
264
-    if [ -d $SMILODON_PATH ]; then
265
-        rm -rf $SMILODON_PATH
266
-    fi
267
-
268
-    if [ -d /repos/smilodon ]; then
269
-        mkdir $SMILODON_PATH
270
-        cp -r -p /repos/smilodon/. $SMILODON_PATH
271
-        cd $SMILODON_PATH
272
-        git pull
273
-    else
274
-        function_check git_clone
275
-        git_clone $SMILODON_REPO $SMILODON_PATH
276
-    fi
277
-
278
-    if [ ! -d $SMILODON_PATH ]; then
279
-        echo $'Could not clone smilodon repo'
280
-        exit 6784783
281
-    fi
282
-    cd $SMILODON_PATH
283
-    git checkout $SMILODON_COMMIT -b $SMILODON_COMMIT
284
-    set_completion_param "smilodon commit" "$SMILODON_COMMIT"
285
-
286
-    sed -i 's|https:|http:|g' $SMILODON_PATH/api/utilities.py
287
-
288
-    groupadd smilodon
289
-    useradd -c "Smilodon system account" -d $SMILODON_PATH -m -r -g smilodon smilodon
290
-
291
-    SMILODON_ONION_HOSTNAME=$(add_onion_service smilodon 80 ${SMILODON_ONION_PORT})
292
-
293
-    if [ ! $SMILODON_SECRET_KEY ]; then
294
-        SMILODON_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)$(create_password 30)"
295
-    fi
296
-
297
-    if [ -f $IMAGE_PASSWORD_FILE ]; then
298
-        SMILODON_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
299
-    else
300
-        if [ ! $SMILODON_ADMIN_PASSWORD ]; then
301
-            SMILODON_ADMIN_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
302
-        fi
303
-    fi
304
-
305
-    export smilodon_domain_name=$SMILODON_ONION_HOSTNAME
306
-    export secret_key="$SMILODON_SECRET_KEY"
307
-    export mongodb_username='smilodon'
308
-    export mongodb_password="$SMILODON_ADMIN_PASSWORD"
309
-    export smilodon_admin_address=$MY_EMAIL_ADDRESS
310
-    export MAIL_SERVER='localhost'
311
-    export MAIL_PORT=25
312
-
313
-    function_check install_mongodb
314
-    install_mongodb smilodon
315
-
316
-    smilodon_create_database
317
-
318
-    pip3 install -r requirements.txt
319
-    if [ ! "$?" = "0" ]; then
320
-        echo $'Unable to install smilodon dependencies'
321
-        exit 87352835
322
-    fi
323
-
324
-    echo 'server {' > /etc/nginx/sites-available/smilodon
325
-    echo "  listen 127.0.0.1:${SMILODON_ONION_PORT} default_server;" >> /etc/nginx/sites-available/smilodon
326
-    echo "  server_name $SMILODON_ONION_HOSTNAME;" >> /etc/nginx/sites-available/smilodon
327
-    echo '' >> /etc/nginx/sites-available/smilodon
328
-    echo '  access_log /dev/null;' >> /etc/nginx/sites-available/smilodon
329
-    echo '  error_log /dev/null;' >> /etc/nginx/sites-available/smilodon
330
-    echo '' >> /etc/nginx/sites-available/smilodon
331
-    echo '  location / {' >> /etc/nginx/sites-available/smilodon
332
-    echo '      proxy_pass http://localhost:5000;' >> /etc/nginx/sites-available/smilodon
333
-    echo '  }' >> /etc/nginx/sites-available/smilodon
334
-    echo '}' >> /etc/nginx/sites-available/smilodon
335
-
336
-    nginx_ensite smilodon
337
-    systemctl enable mongodb
338
-    systemctl restart mongodb
339
-
340
-    chown -R smilodon:smilodon ${SMILODON_PATH}
341
-
342
-    echo '#!/bin/bash' > ${SMILODON_PATH}/run_smilodon.sh
343
-    echo "cd ${SMILODON_PATH}" >> ${SMILODON_PATH}/run_smilodon.sh
344
-    echo "export smilodon_domain_name=$SMILODON_ONION_HOSTNAME" >> ${SMILODON_PATH}/run_smilodon.sh
345
-    echo "export secret_key='$SMILODON_SECRET_KEY'" >> ${SMILODON_PATH}/run_smilodon.sh
346
-    echo "export mongodb_username='smilodon'" >> ${SMILODON_PATH}/run_smilodon.sh
347
-    echo "export mongodb_password='$SMILODON_ADMIN_PASSWORD'" >> ${SMILODON_PATH}/run_smilodon.sh
348
-    echo "export smilodon_admin_address=$MY_EMAIL_ADDRESS" >> ${SMILODON_PATH}/run_smilodon.sh
349
-    echo "export MAIL_SERVER='localhost'" >> ${SMILODON_PATH}/run_smilodon.sh
350
-    echo "export MAIL_PORT=25" >> ${SMILODON_PATH}/run_smilodon.sh
351
-    echo "export API_NAME=$SMILODON_ONION_HOSTNAME" >> ${SMILODON_PATH}/run_smilodon.sh
352
-    echo "python3 run.py" >> ${SMILODON_PATH}/run_smilodon.sh
353
-    chmod +x ${SMILODON_PATH}/run_smilodon.sh
354
-    chown smilodon:smilodon ${SMILODON_PATH}/run_smilodon.sh
355
-
356
-    echo '[Unit]' > /etc/systemd/system/smilodon.service
357
-    echo 'Description=Smilodon ActivityPub messenger' >> /etc/systemd/system/smilodon.service
358
-    echo 'After=network.target mongodb.service' >> /etc/systemd/system/smilodon.service
359
-    echo 'After=tor.service' >> /etc/systemd/system/smilodon.service
360
-    echo '' >> /etc/systemd/system/smilodon.service
361
-    echo '[Service]' >> /etc/systemd/system/smilodon.service
362
-    echo 'User=smilodon' >> /etc/systemd/system/smilodon.service
363
-    echo 'Group=smilodon' >> /etc/systemd/system/smilodon.service
364
-    echo "WorkingDirectory=${SMILODON_PATH}/" >> /etc/systemd/system/smilodon.service
365
-    echo "ExecStart=${SMILODON_PATH}/run_smilodon.sh" >> /etc/systemd/system/smilodon.service
366
-    echo 'Restart=on-failure' >> /etc/systemd/system/smilodon.service
367
-    echo 'RestartSec=10' >> /etc/systemd/system/smilodon.service
368
-    echo '' >> /etc/systemd/system/smilodon.service
369
-    echo '[Install]' >> /etc/systemd/system/smilodon.service
370
-    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/smilodon.service
371
-    systemctl enable smilodon
372
-    systemctl daemon-reload
373
-    systemctl start smilodon
374
-    systemctl restart nginx
375
-
376
-    ${PROJECT_NAME}-pass -u $MY_USERNAME -a smilodon -p "$SMILODON_ADMIN_PASSWORD"
377
-
378
-    APP_INSTALLED=1
379
-}
380
-
381
-# NOTE: deliberately no exit 0

+ 1
- 1
src/freedombone-app-tahoelafs Ver arquivo

15
 # License
15
 # License
16
 # =======
16
 # =======
17
 #
17
 #
18
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
18
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
19
 #
19
 #
20
 # This program is free software: you can redistribute it and/or modify
20
 # This program is free software: you can redistribute it and/or modify
21
 # it under the terms of the GNU Affero General Public License as published by
21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-vpn Ver arquivo

16
 # License
16
 # License
17
 # =======
17
 # =======
18
 #
18
 #
19
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
19
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
20
 #
20
 #
21
 # This program is free software: you can redistribute it and/or modify
21
 # This program is free software: you can redistribute it and/or modify
22
 # it under the terms of the GNU Affero General Public License as published by
22
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-wekan Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 5
- 1
src/freedombone-app-xmpp Ver arquivo

10
 #
10
 #
11
 # XMPP functions
11
 # XMPP functions
12
 #
12
 #
13
+# The two directories for prosody modules seem necessary.
14
+# Trying to remove /usr/lib/prosody/modules causes problems, and that's
15
+# part of the package install.
16
+#
13
 # License
17
 # License
14
 # =======
18
 # =======
15
 #
19
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
20
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
21
 #
18
 # This program is free software: you can redistribute it and/or modify
22
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
23
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-base-email Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 13
src/freedombone-client Ver arquivo

36
 if [ -f /usr/bin/pacman ]; then
36
 if [ -f /usr/bin/pacman ]; then
37
     CURR_GROUP='users'
37
     CURR_GROUP='users'
38
 fi
38
 fi
39
-MESH_CLIENT_INSTALL=
40
 ENABLE_MONKEYSPHERE=
39
 ENABLE_MONKEYSPHERE=
41
 
40
 
42
 # setup for a specific app
41
 # setup for a specific app
211
 
210
 
212
 function show_help {
211
 function show_help {
213
     echo ''
212
     echo ''
214
-    echo $"${PROJECT_NAME}-client --mesh [yes|no] --monkeysphere [yes|no]"
213
+    echo $"${PROJECT_NAME}-client --monkeysphere [yes|no]"
215
     echo ''
214
     echo ''
216
     exit 0
215
     exit 0
217
 }
216
 }
319
             verify_ssh_server_key
318
             verify_ssh_server_key
320
             exit 0
319
             exit 0
321
             ;;
320
             ;;
322
-        -m|--mesh)
323
-            shift
324
-            MESH_CLIENT_INSTALL=${1}
325
-            ;;
326
         --monkeysphere|--ms|--monkey)
321
         --monkeysphere|--ms|--monkey)
327
             shift
322
             shift
328
             ENABLE_MONKEYSPHERE=${1}
323
             ENABLE_MONKEYSPHERE=${1}
342
 global_rate_limit
337
 global_rate_limit
343
 configure_monkeysphere
338
 configure_monkeysphere
344
 remove_known_hosts_entries
339
 remove_known_hosts_entries
345
-if [[ $MESH_CLIENT_INSTALL == $'yes' || $MESH_CLIENT_INSTALL == $'y' || $MESH_CLIENT_INSTALL == $'on' ]]; then
346
-    echo $'Installing mesh packages'
347
-    sudo ${PROJECT_NAME}-mesh-install -f tox_node
348
-    sudo ${PROJECT_NAME}-mesh-install -f toxic
349
-    ${PROJECT_NAME}-mesh-install -f qtox
350
-    sudo ${PROJECT_NAME}-mesh-install -f zeronet
351
-fi
352
 echo $'Configuration complete'
340
 echo $'Configuration complete'
353
 exit 0
341
 exit 0

+ 1
- 1
src/freedombone-config Ver arquivo

14
 # License
14
 # License
15
 # =======
15
 # =======
16
 #
16
 #
17
-# Copyright (C) 2015-2017 Bob Mottram <bob@freedombone.net>
17
+# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
18
 #
18
 #
19
 # This program is free software: you can redistribute it and/or modify
19
 # This program is free software: you can redistribute it and/or modify
20
 # it under the terms of the GNU Affero General Public License as published by
20
 # it under the terms of the GNU Affero General Public License as published by

+ 115
- 36
src/freedombone-controlpanel Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2015-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by
166
             fi
166
             fi
167
             ;;
167
             ;;
168
     esac
168
     esac
169
+    rm $data
169
 }
170
 }
170
 
171
 
171
 function get_app_icann_address {
172
 function get_app_icann_address {
304
             fi
305
             fi
305
             ;;
306
             ;;
306
     esac
307
     esac
307
-
308
+    rm $data
308
 }
309
 }
309
 
310
 
310
 function check_for_updates {
311
 function check_for_updates {
330
            2> $data
331
            2> $data
331
     sel=$?
332
     sel=$?
332
     case $sel in
333
     case $sel in
333
-        1) return;;
334
-        255) return;;
334
+        1) rm $data
335
+           return;;
336
+        255) rm $data
337
+             return;;
335
     esac
338
     esac
336
     new_user_username=$(cat $data | sed -n 1p)
339
     new_user_username=$(cat $data | sed -n 1p)
337
     new_user_ssh_public_key=$(cat $data | sed -n 2p)
340
     new_user_ssh_public_key=$(cat $data | sed -n 2p)
338
     if [ ${#new_user_username} -lt 2 ]; then
341
     if [ ${#new_user_username} -lt 2 ]; then
339
         dialog --title $"New username" \
342
         dialog --title $"New username" \
340
                --msgbox $"No username was given" 6 40
343
                --msgbox $"No username was given" 6 40
344
+        rm $data
341
         return
345
         return
342
     fi
346
     fi
343
     if [[ "$new_user_username" == *" "* ]]; then
347
     if [[ "$new_user_username" == *" "* ]]; then
344
         dialog --title $"Invalid username" \
348
         dialog --title $"Invalid username" \
345
                --msgbox $"The username should not contain any spaces" 6 40
349
                --msgbox $"The username should not contain any spaces" 6 40
350
+        rm $data
346
         return
351
         return
347
     fi
352
     fi
348
     if [ ${#new_user_ssh_public_key} -lt 20 ]; then
353
     if [ ${#new_user_ssh_public_key} -lt 20 ]; then
359
                    --msgbox $"This does not look like an ssh public key" 6 40
364
                    --msgbox $"This does not look like an ssh public key" 6 40
360
         fi
365
         fi
361
     fi
366
     fi
367
+    rm $data
362
 }
368
 }
363
 
369
 
364
 function pad_string {
370
 function pad_string {
742
             fi
748
             fi
743
             ;;
749
             ;;
744
     esac
750
     esac
751
+    rm $data
745
 }
752
 }
746
 
753
 
747
 function remove_user_from_mailing_list {
754
 function remove_user_from_mailing_list {
848
            2> $data
855
            2> $data
849
     sel=$?
856
     sel=$?
850
     case $sel in
857
     case $sel in
851
-        1) return;;
852
-        255) return;;
858
+        1)  rm $data
859
+            return;;
860
+        255) rm $data
861
+             return;;
853
     esac
862
     esac
854
     LIST_NAME=$(cat $data | sed -n 1p)
863
     LIST_NAME=$(cat $data | sed -n 1p)
855
     LIST_SUBJECT=$(cat $data | sed -n 2p)
864
     LIST_SUBJECT=$(cat $data | sed -n 2p)
867
     if [ ${#LIST_NAME} -lt 2 ]; then
876
     if [ ${#LIST_NAME} -lt 2 ]; then
868
         dialog --title $"Add mailing list" \
877
         dialog --title $"Add mailing list" \
869
                --msgbox $"No mailing list name was given" 6 40
878
                --msgbox $"No mailing list name was given" 6 40
879
+        rm $data
870
         return
880
         return
871
     fi
881
     fi
872
     if [ ${#LIST_SUBJECT} -lt 2 ]; then
882
     if [ ${#LIST_SUBJECT} -lt 2 ]; then
873
         if [ ${#LIST_EMAIL} -lt 2 ]; then
883
         if [ ${#LIST_EMAIL} -lt 2 ]; then
874
             dialog --title $"Add mailing list" \
884
             dialog --title $"Add mailing list" \
875
                    --msgbox $"No mailing list subject or address was given" 6 40
885
                    --msgbox $"No mailing list subject or address was given" 6 40
886
+            rm $data
876
             return
887
             return
877
         fi
888
         fi
878
     fi
889
     fi
883
         if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
894
         if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
884
             dialog --title $"Add mailing list" \
895
             dialog --title $"Add mailing list" \
885
                    --msgbox $"Unrecognised email address" 6 40
896
                    --msgbox $"Unrecognised email address" 6 40
897
+            rm $data
886
             return
898
             return
887
         else
899
         else
888
             ${PROJECT_NAME}-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
900
             ${PROJECT_NAME}-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
892
 
904
 
893
     dialog --title $"Add mailing list" \
905
     dialog --title $"Add mailing list" \
894
            --msgbox $"$LIST_NAME list was added" 6 40
906
            --msgbox $"$LIST_NAME list was added" 6 40
907
+    rm $data
895
 }
908
 }
896
 
909
 
897
 function email_rule {
910
 function email_rule {
910
            2> $data
923
            2> $data
911
     sel=$?
924
     sel=$?
912
     case $sel in
925
     case $sel in
913
-        1) return;;
914
-        255) return;;
926
+        1) rm $data
927
+           return;;
928
+        255) rm $data
929
+             return;;
915
     esac
930
     esac
916
     RULE_EMAIL=$(cat $data | sed -n 1p)
931
     RULE_EMAIL=$(cat $data | sed -n 1p)
917
     RULE_FOLDER=$(cat $data | sed -n 2p)
932
     RULE_FOLDER=$(cat $data | sed -n 2p)
928
     if [ ${#RULE_EMAIL} -lt 2 ]; then
943
     if [ ${#RULE_EMAIL} -lt 2 ]; then
929
         dialog --title $"Add email rule" \
944
         dialog --title $"Add email rule" \
930
                --msgbox $"No email address was given" 6 40
945
                --msgbox $"No email address was given" 6 40
946
+        rm $data
931
         return
947
         return
932
     fi
948
     fi
933
     if [ ${#RULE_FOLDER} -lt 2 ]; then
949
     if [ ${#RULE_FOLDER} -lt 2 ]; then
934
         dialog --title $"Add email rule" \
950
         dialog --title $"Add email rule" \
935
                --msgbox $"No folder name was given" 6 40
951
                --msgbox $"No folder name was given" 6 40
952
+        rm $data
936
         return
953
         return
937
     fi
954
     fi
938
     if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
955
     if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
939
         dialog --title $"Add email rule" \
956
         dialog --title $"Add email rule" \
940
                --msgbox $"Unrecognised email address" 6 40
957
                --msgbox $"Unrecognised email address" 6 40
958
+        rm $data
941
         return
959
         return
942
     fi
960
     fi
943
 
961
 
945
                    -g "$RULE_FOLDER" --public $RULE_PUBLIC
963
                    -g "$RULE_FOLDER" --public $RULE_PUBLIC
946
     dialog --title $"Add email rule" \
964
     dialog --title $"Add email rule" \
947
            --msgbox $"Email rule for $RULE_EMAIL was added" 6 40
965
            --msgbox $"Email rule for $RULE_EMAIL was added" 6 40
966
+    rm $data
948
 }
967
 }
949
 
968
 
950
 function block_unblock_email {
969
 function block_unblock_email {
963
            2> $data
982
            2> $data
964
     sel=$?
983
     sel=$?
965
     case $sel in
984
     case $sel in
966
-        1) return;;
967
-        255) return;;
985
+        1) rm $data
986
+           return;;
987
+        255) rm $data
988
+             return;;
968
     esac
989
     esac
969
     BLOCK_EMAIL=$(cat $data | sed -n 1p)
990
     BLOCK_EMAIL=$(cat $data | sed -n 1p)
970
     BLOCK=$(cat $data | sed -n 2p)
991
     BLOCK=$(cat $data | sed -n 2p)
971
     if [ ${#BLOCK_EMAIL} -lt 2 ]; then
992
     if [ ${#BLOCK_EMAIL} -lt 2 ]; then
972
         dialog --title $"Block/Unblock an email" \
993
         dialog --title $"Block/Unblock an email" \
973
                --msgbox $"No email address was given" 6 40
994
                --msgbox $"No email address was given" 6 40
995
+        rm $data
974
         return
996
         return
975
     fi
997
     fi
976
     if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
998
     if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
977
         dialog --title $"Block/Unblock an email" \
999
         dialog --title $"Block/Unblock an email" \
978
                --msgbox $"Unrecognised email address" 6 40
1000
                --msgbox $"Unrecognised email address" 6 40
1001
+        rm $data
979
         return
1002
         return
980
     fi
1003
     fi
981
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
1004
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
987
         dialog --title $"Unblock an email" \
1010
         dialog --title $"Unblock an email" \
988
                --msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 75
1011
                --msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 75
989
     fi
1012
     fi
1013
+    rm $data
990
 }
1014
 }
991
 
1015
 
992
 function block_unblock_subject {
1016
 function block_unblock_subject {
1005
            2> $data
1029
            2> $data
1006
     sel=$?
1030
     sel=$?
1007
     case $sel in
1031
     case $sel in
1008
-        1) return;;
1009
-        255) return;;
1032
+        1) rm $data
1033
+           return;;
1034
+        255) rm $data
1035
+             return;;
1010
     esac
1036
     esac
1011
     BLOCK_SUBJECT=$(cat $data | sed -n 1p)
1037
     BLOCK_SUBJECT=$(cat $data | sed -n 1p)
1012
     BLOCK=$(cat $data | sed -n 2p)
1038
     BLOCK=$(cat $data | sed -n 2p)
1013
     if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
1039
     if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
1014
         dialog --title $"Block/Unblock an email" \
1040
         dialog --title $"Block/Unblock an email" \
1015
                --msgbox $"No subject was given" 6 40
1041
                --msgbox $"No subject was given" 6 40
1042
+        rm $data
1016
         return
1043
         return
1017
     fi
1044
     fi
1018
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
1045
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
1024
         dialog --title $"Unblock an email" \
1051
         dialog --title $"Unblock an email" \
1025
                --msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40
1052
                --msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40
1026
     fi
1053
     fi
1054
+    rm $data
1027
 }
1055
 }
1028
 
1056
 
1029
 function create_keydrive_master {
1057
 function create_keydrive_master {
1226
             friend_server_domain_name=$(<$data)
1254
             friend_server_domain_name=$(<$data)
1227
 
1255
 
1228
             if [ ${#friend_server_domain_name} -lt 2 ]; then
1256
             if [ ${#friend_server_domain_name} -lt 2 ]; then
1257
+                rm $data
1229
                 return
1258
                 return
1230
             fi
1259
             fi
1231
 
1260
 
1232
             if [[ $friend_server_domain_name != *"."* ]]; then
1261
             if [[ $friend_server_domain_name != *"."* ]]; then
1233
                 dialog --title $"Remote server domain name" \
1262
                 dialog --title $"Remote server domain name" \
1234
                        --msgbox $"Invalid domain name" 6 40
1263
                        --msgbox $"Invalid domain name" 6 40
1264
+                rm $data
1235
                 return
1265
                 return
1236
             fi
1266
             fi
1237
 
1267
 
1238
             restore_data_from_storage $friend_server_domain_name
1268
             restore_data_from_storage $friend_server_domain_name
1239
             ;;
1269
             ;;
1240
     esac
1270
     esac
1271
+    rm $data
1241
 }
1272
 }
1242
 
1273
 
1243
 function ping_enable_disable {
1274
 function ping_enable_disable {
1387
            --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
1418
            --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
1388
     sel=$?
1419
     sel=$?
1389
     case $sel in
1420
     case $sel in
1390
-        1) return;;
1391
-        255) return;;
1421
+        1) rm $data
1422
+           return;;
1423
+        255) rm $data
1424
+             return;;
1392
     esac
1425
     esac
1393
 
1426
 
1394
     clear
1427
     clear
1397
     echo ''
1430
     echo ''
1398
     ${PROJECT_NAME}-format $USB_DRIVE
1431
     ${PROJECT_NAME}-format $USB_DRIVE
1399
     any_key
1432
     any_key
1433
+    rm $data
1400
 }
1434
 }
1401
 
1435
 
1402
 function remove_backups {
1436
 function remove_backups {
1409
            --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
1443
            --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
1410
     sel=$?
1444
     sel=$?
1411
     case $sel in
1445
     case $sel in
1412
-        1) return;;
1413
-        255) return;;
1446
+        1) rm $data
1447
+           return;;
1448
+        255) rm $data
1449
+             return;;
1414
     esac
1450
     esac
1415
 
1451
 
1416
     clear
1452
     clear
1417
     ${PROJECT_NAME}-backup-local $USB_DRIVE remove
1453
     ${PROJECT_NAME}-backup-local $USB_DRIVE remove
1418
     any_key
1454
     any_key
1455
+    rm $data
1419
 }
1456
 }
1420
 
1457
 
1421
 function shut_down_system {
1458
 function shut_down_system {
1465
            fi
1502
            fi
1466
            ;;
1503
            ;;
1467
     esac
1504
     esac
1505
+    rm $data
1468
 }
1506
 }
1469
 
1507
 
1470
 function set_dynamic_IP {
1508
 function set_dynamic_IP {
1515
         0) NEW_STATIC_IP=$(<$data)
1553
         0) NEW_STATIC_IP=$(<$data)
1516
            if [[ "$NEW_STATIC_IP" != *"."* ]]; then
1554
            if [[ "$NEW_STATIC_IP" != *"."* ]]; then
1517
                set_dynamic_IP
1555
                set_dynamic_IP
1556
+               rm $data
1518
                return
1557
                return
1519
            fi
1558
            fi
1520
            ;;
1559
            ;;
1521
-        1) return;;
1560
+        1) rm $data
1561
+           return;;
1522
     esac
1562
     esac
1563
+    rm $data
1523
 
1564
 
1524
     # get the gateway
1565
     # get the gateway
1525
     data=$(tempfile 2>/dev/null)
1566
     data=$(tempfile 2>/dev/null)
1531
     case $sel in
1572
     case $sel in
1532
         0) NEW_STATIC_GATEWAY=$(<$data)
1573
         0) NEW_STATIC_GATEWAY=$(<$data)
1533
            if [[ "$NEW_STATIC_GATEWAY" != *"."* ]]; then
1574
            if [[ "$NEW_STATIC_GATEWAY" != *"."* ]]; then
1575
+               rm $data
1534
                return
1576
                return
1535
            fi
1577
            fi
1536
            ;;
1578
            ;;
1537
-        1) return;;
1579
+        1) rm $data
1580
+           return;;
1538
     esac
1581
     esac
1539
 
1582
 
1540
     if [[ "$NEW_STATIC_GATEWAY" == *"."* && "$NEW_STATIC_IP" == *"."* ]]; then
1583
     if [[ "$NEW_STATIC_GATEWAY" == *"."* && "$NEW_STATIC_IP" == *"."* ]]; then
1604
             esac
1647
             esac
1605
         fi
1648
         fi
1606
     fi
1649
     fi
1650
+    rm $data
1607
 }
1651
 }
1608
 
1652
 
1609
 function wifi_settings {
1653
 function wifi_settings {
1662
            2> $data
1706
            2> $data
1663
     sel=$?
1707
     sel=$?
1664
     case $sel in
1708
     case $sel in
1665
-        1) return;;
1666
-        255) return;;
1709
+        1) rm $data
1710
+           return;;
1711
+        255) rm $data
1712
+             return;;
1667
     esac
1713
     esac
1668
     TEMP_WIFI_HOTSPOT=$(cat $data | sed -n 1p)
1714
     TEMP_WIFI_HOTSPOT=$(cat $data | sed -n 1p)
1669
     TEMP_WIFI_SSID=$(cat $data | sed -n 2p)
1715
     TEMP_WIFI_SSID=$(cat $data | sed -n 2p)
1671
     TEMP_WIFI_PASSPHRASE=$(cat $data | sed -n 4p)
1717
     TEMP_WIFI_PASSPHRASE=$(cat $data | sed -n 4p)
1672
 
1718
 
1673
     if [ ${#TEMP_WIFI_SSID} -lt 2 ]; then
1719
     if [ ${#TEMP_WIFI_SSID} -lt 2 ]; then
1720
+        rm $data
1674
         return
1721
         return
1675
     fi
1722
     fi
1676
     if [ ${#TEMP_WIFI_TYPE} -lt 2 ]; then
1723
     if [ ${#TEMP_WIFI_TYPE} -lt 2 ]; then
1724
+        rm $data
1677
         return
1725
         return
1678
     fi
1726
     fi
1679
 
1727
 
1691
         if [ ! $TEMP_WIFI_PASSPHRASE ]; then
1739
         if [ ! $TEMP_WIFI_PASSPHRASE ]; then
1692
             dialog --title $"Wifi Settings" \
1740
             dialog --title $"Wifi Settings" \
1693
                    --msgbox $"No wifi hotspot passphrase was given" 6 40
1741
                    --msgbox $"No wifi hotspot passphrase was given" 6 40
1742
+            rm $data
1694
             return
1743
             return
1695
         fi
1744
         fi
1696
         if [ ${#TEMP_WIFI_PASSPHRASE} -lt 2 ]; then
1745
         if [ ${#TEMP_WIFI_PASSPHRASE} -lt 2 ]; then
1697
             dialog --title $"Wifi Settings" \
1746
             dialog --title $"Wifi Settings" \
1698
                    --msgbox $"Wifi hotspot passphrase was too short" 6 40
1747
                    --msgbox $"Wifi hotspot passphrase was too short" 6 40
1748
+            rm $data
1699
             return
1749
             return
1700
         fi
1750
         fi
1701
 
1751
 
1726
 
1776
 
1727
     dialog --title $"Wifi Settings" \
1777
     dialog --title $"Wifi Settings" \
1728
            --msgbox $"Hotspot settings were changed" 6 40
1778
            --msgbox $"Hotspot settings were changed" 6 40
1779
+    rm $data
1729
 }
1780
 }
1730
 
1781
 
1731
 function reinstall_mariadb {
1782
 function reinstall_mariadb {
1792
             fi
1843
             fi
1793
             ;;
1844
             ;;
1794
     esac
1845
     esac
1846
+    rm $data
1795
 }
1847
 }
1796
 
1848
 
1797
 function email_smtp_proxy {
1849
 function email_smtp_proxy {
1823
     SMTP_PROXY_PORT=$(cat $data | sed -n 4p)
1875
     SMTP_PROXY_PORT=$(cat $data | sed -n 4p)
1824
     SMTP_PROXY_USERNAME=$(cat $data | sed -n 5p)
1876
     SMTP_PROXY_USERNAME=$(cat $data | sed -n 5p)
1825
     SMTP_PROXY_PASSWORD=$(cat $data | sed -n 6p)
1877
     SMTP_PROXY_PASSWORD=$(cat $data | sed -n 6p)
1878
+    rm $data
1826
 
1879
 
1827
     # change muttrc
1880
     # change muttrc
1828
     if [ $SMTP_PROXY_ENABLE != $'no' ]; then
1881
     if [ $SMTP_PROXY_ENABLE != $'no' ]; then
1868
                11 $"Back to main menu" on 2> $data
1921
                11 $"Back to main menu" on 2> $data
1869
         sel=$?
1922
         sel=$?
1870
         case $sel in
1923
         case $sel in
1871
-            1) break;;
1872
-            255) break;;
1924
+            1) rm $data
1925
+               break;;
1926
+            255) rm $data
1927
+                 break;;
1873
         esac
1928
         esac
1874
         case $(cat $data) in
1929
         case $(cat $data) in
1875
             1) backup_data;;
1930
             1) backup_data;;
1884
             10) remove_backups;;
1939
             10) remove_backups;;
1885
             11) break;;
1940
             11) break;;
1886
         esac
1941
         esac
1942
+        rm $data
1887
     done
1943
     done
1888
 }
1944
 }
1889
 
1945
 
1905
                8 $"Back to main menu" on 2> $data
1961
                8 $"Back to main menu" on 2> $data
1906
         sel=$?
1962
         sel=$?
1907
         case $sel in
1963
         case $sel in
1908
-            1) break;;
1909
-            255) break;;
1964
+            1) rm $data
1965
+               break;;
1966
+            255) rm $data
1967
+                 break;;
1910
         esac
1968
         esac
1911
         case $(cat $data) in
1969
         case $(cat $data) in
1912
             1) add_to_mailing_list;;
1970
             1) add_to_mailing_list;;
1918
             7) email_extra_domains;;
1976
             7) email_extra_domains;;
1919
             8) break;;
1977
             8) break;;
1920
         esac
1978
         esac
1979
+        rm $data
1921
     done
1980
     done
1922
 }
1981
 }
1923
 
1982
 
1945
             fi
2004
             fi
1946
             ;;
2005
             ;;
1947
     esac
2006
     esac
2007
+    rm $data
1948
 }
2008
 }
1949
 
2009
 
1950
 function ip_blocking_add {
2010
 function ip_blocking_add {
1968
             fi
2028
             fi
1969
             ;;
2029
             ;;
1970
     esac
2030
     esac
2031
+    rm $data
1971
 }
2032
 }
1972
 
2033
 
1973
 function domain_blocking_remove {
2034
 function domain_blocking_remove {
1994
             fi
2055
             fi
1995
             ;;
2056
             ;;
1996
     esac
2057
     esac
2058
+    rm $data
1997
 }
2059
 }
1998
 
2060
 
1999
 function ip_blocking_remove {
2061
 function ip_blocking_remove {
2017
             fi
2079
             fi
2018
             ;;
2080
             ;;
2019
     esac
2081
     esac
2082
+    rm $data
2020
 }
2083
 }
2021
 
2084
 
2022
 function domain_blocking_show {
2085
 function domain_blocking_show {
2049
                6 $"Back to main menu" on 2> $data
2112
                6 $"Back to main menu" on 2> $data
2050
         sel=$?
2113
         sel=$?
2051
         case $sel in
2114
         case $sel in
2052
-            1) break;;
2053
-            255) break;;
2115
+            1) rm $data
2116
+               break;;
2117
+            255) rm $data
2118
+                 break;;
2054
         esac
2119
         esac
2055
         case $(cat $data) in
2120
         case $(cat $data) in
2056
             1) domain_blocking_add;;
2121
             1) domain_blocking_add;;
2058
             3) ip_blocking_add;;
2123
             3) ip_blocking_add;;
2059
             4) ip_blocking_remove;;
2124
             4) ip_blocking_remove;;
2060
             5) domain_blocking_show;;
2125
             5) domain_blocking_show;;
2061
-            6) break;;
2126
+            6) rm $data
2127
+               break;;
2062
         esac
2128
         esac
2129
+        rm $data
2063
     done
2130
     done
2064
 }
2131
 }
2065
 
2132
 
2079
                6 $"Back to main menu" on 2> $data
2146
                6 $"Back to main menu" on 2> $data
2080
         sel=$?
2147
         sel=$?
2081
         case $sel in
2148
         case $sel in
2082
-            1) break;;
2083
-            255) break;;
2149
+            1) rm $data
2150
+               break;;
2151
+            255) rm $data
2152
+                 break;;
2084
         esac
2153
         esac
2085
         case $(cat $data) in
2154
         case $(cat $data) in
2086
             1) add_user;;
2155
             1) add_user;;
2088
             3) change_password;;
2157
             3) change_password;;
2089
             4) change_ssh_public_key;;
2158
             4) change_ssh_public_key;;
2090
             5) reset_password_tries;;
2159
             5) reset_password_tries;;
2091
-            6) break;;
2160
+            6) rm $data
2161
+               break;;
2092
         esac
2162
         esac
2163
+        rm $data
2093
     done
2164
     done
2094
 }
2165
 }
2095
 
2166
 
2172
                5 $"Exit" on 2> $data
2243
                5 $"Exit" on 2> $data
2173
         sel=$?
2244
         sel=$?
2174
         case $sel in
2245
         case $sel in
2175
-            1) break;;
2176
-            255) break;;
2246
+            1) rm $data
2247
+               break;;
2248
+            255) rm $data
2249
+                 break;;
2177
         esac
2250
         esac
2178
         case $(cat $data) in
2251
         case $(cat $data) in
2179
             1) wifi_enable;;
2252
             1) wifi_enable;;
2180
             2) wifi_settings;;
2253
             2) wifi_settings;;
2181
             3) wifi_edit_networks;;
2254
             3) wifi_edit_networks;;
2182
             4) hotspot_settings;;
2255
             4) hotspot_settings;;
2183
-            5) break;;
2256
+            5) rm $data
2257
+               break;;
2184
         esac
2258
         esac
2259
+        rm $data
2185
     done
2260
     done
2186
 }
2261
 }
2187
 
2262
 
2256
                22 $"Exit" on 2> $data
2331
                22 $"Exit" on 2> $data
2257
         sel=$?
2332
         sel=$?
2258
         case $sel in
2333
         case $sel in
2259
-            1) exit 1;;
2260
-            255) exit 1;;
2334
+            1) rm $data
2335
+               exit 1;;
2336
+            255) rm $data
2337
+                 exit 1;;
2261
         esac
2338
         esac
2262
         please_wait
2339
         please_wait
2263
         case $(cat $data) in
2340
         case $(cat $data) in
2287
             19) check_for_updates;;
2364
             19) check_for_updates;;
2288
             20) shut_down_system;;
2365
             20) shut_down_system;;
2289
             21) restart_system;;
2366
             21) restart_system;;
2290
-            22) break;;
2367
+            22) rm $data
2368
+                break;;
2291
         esac
2369
         esac
2370
+        rm $data
2292
     done
2371
     done
2293
 }
2372
 }
2294
 
2373
 

+ 72
- 24
src/freedombone-controlpanel-user Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by
169
            2> $data
169
            2> $data
170
     sel=$?
170
     sel=$?
171
     case $sel in
171
     case $sel in
172
-        1) return;;
173
-        255) return;;
172
+        1) rm $data
173
+           return;;
174
+        255) rm $data
175
+             return;;
174
     esac
176
     esac
175
     LIST_NAME=$(cat $data | sed -n 1p)
177
     LIST_NAME=$(cat $data | sed -n 1p)
176
     LIST_SUBJECT=$(cat $data | sed -n 2p)
178
     LIST_SUBJECT=$(cat $data | sed -n 2p)
188
     if [ ${#LIST_NAME} -lt 2 ]; then
190
     if [ ${#LIST_NAME} -lt 2 ]; then
189
         dialog --title $"Add mailing list" \
191
         dialog --title $"Add mailing list" \
190
                --msgbox $"No mailing list name was given" 6 40
192
                --msgbox $"No mailing list name was given" 6 40
193
+        rm $data
191
         return
194
         return
192
     fi
195
     fi
193
     if [ ${#LIST_SUBJECT} -lt 2 ]; then
196
     if [ ${#LIST_SUBJECT} -lt 2 ]; then
194
         if [ ${#LIST_EMAIL} -lt 2 ]; then
197
         if [ ${#LIST_EMAIL} -lt 2 ]; then
195
             dialog --title $"Add mailing list" \
198
             dialog --title $"Add mailing list" \
196
                    --msgbox $"No mailing list subject or address was given" 6 40
199
                    --msgbox $"No mailing list subject or address was given" 6 40
200
+            rm $data
197
             return
201
             return
198
         fi
202
         fi
199
     fi
203
     fi
204
         if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
208
         if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
205
             dialog --title $"Add mailing list" \
209
             dialog --title $"Add mailing list" \
206
                    --msgbox $"Unrecognised email address" 6 40
210
                    --msgbox $"Unrecognised email address" 6 40
211
+            rm $data
207
             return
212
             return
208
         else
213
         else
209
             ${PROJECT_NAME}-addlist -u $USER -l "$LIST_NAME" \
214
             ${PROJECT_NAME}-addlist -u $USER -l "$LIST_NAME" \
213
 
218
 
214
     dialog --title $"Add mailing list" \
219
     dialog --title $"Add mailing list" \
215
            --msgbox $"$LIST_NAME list was added" 6 40
220
            --msgbox $"$LIST_NAME list was added" 6 40
221
+    rm $data
216
 }
222
 }
217
 
223
 
218
 function email_rule_address {
224
 function email_rule_address {
227
            2> $data
233
            2> $data
228
     sel=$?
234
     sel=$?
229
     case $sel in
235
     case $sel in
230
-        1) return;;
231
-        255) return;;
236
+        1) rm $data
237
+           return;;
238
+        255) rm $data
239
+             return;;
232
     esac
240
     esac
233
     RULE_EMAIL=$(cat $data | sed -n 1p)
241
     RULE_EMAIL=$(cat $data | sed -n 1p)
234
     RULE_FOLDER=$(cat $data | sed -n 2p)
242
     RULE_FOLDER=$(cat $data | sed -n 2p)
245
     if [ ${#RULE_EMAIL} -lt 2 ]; then
253
     if [ ${#RULE_EMAIL} -lt 2 ]; then
246
         dialog --title $"Create an email rule" \
254
         dialog --title $"Create an email rule" \
247
                --msgbox $"No email address was given" 6 40
255
                --msgbox $"No email address was given" 6 40
256
+        rm $data
248
         return
257
         return
249
     fi
258
     fi
250
     if [ ${#RULE_FOLDER} -lt 2 ]; then
259
     if [ ${#RULE_FOLDER} -lt 2 ]; then
251
         dialog --title $"Create an email rule" \
260
         dialog --title $"Create an email rule" \
252
                --msgbox $"No folder name was given" 6 40
261
                --msgbox $"No folder name was given" 6 40
262
+        rm $data
253
         return
263
         return
254
     fi
264
     fi
255
     if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
265
     if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
256
         dialog --title $"Create an email rule" \
266
         dialog --title $"Create an email rule" \
257
                --msgbox $"Unrecognised email address" 6 40
267
                --msgbox $"Unrecognised email address" 6 40
268
+        rm $data
258
         return
269
         return
259
     fi
270
     fi
260
 
271
 
262
                    -g "$RULE_FOLDER" --public $RULE_PUBLIC
273
                    -g "$RULE_FOLDER" --public $RULE_PUBLIC
263
     dialog --title $"Create an email rule" \
274
     dialog --title $"Create an email rule" \
264
            --msgbox $"Email rule for $RULE_EMAIL was added" 6 40
275
            --msgbox $"Email rule for $RULE_EMAIL was added" 6 40
276
+    rm $data
265
 }
277
 }
266
 
278
 
267
 function gpg_set_trust {
279
 function gpg_set_trust {
281
                5 $"I trust ultimately" off 2> $data
293
                5 $"I trust ultimately" off 2> $data
282
         sel=$?
294
         sel=$?
283
         case $sel in
295
         case $sel in
284
-            1) return;;
285
-            255) return;;
296
+            1) rm $data
297
+               return;;
298
+            255) rm $data
299
+                 return;;
286
         esac
300
         esac
287
         TRUST_LEVEL=$(cat $data)
301
         TRUST_LEVEL=$(cat $data)
288
         if [ ${TRUST_LEVEL} -ge 1 ] ; then
302
         if [ ${TRUST_LEVEL} -ge 1 ] ; then
296
                 fi
310
                 fi
297
             fi
311
             fi
298
         fi
312
         fi
313
+        rm $data
299
     fi
314
     fi
300
 }
315
 }
301
 
316
 
311
            2> $data
326
            2> $data
312
     sel=$?
327
     sel=$?
313
     case $sel in
328
     case $sel in
314
-        1) return;;
315
-        255) return;;
329
+        1) rm $data
330
+           return;;
331
+        255) rm $data
332
+             return;;
316
     esac
333
     esac
317
     RULE_SUBJECT=$(cat $data | sed -n 1p)
334
     RULE_SUBJECT=$(cat $data | sed -n 1p)
318
     RULE_FOLDER=$(cat $data | sed -n 2p)
335
     RULE_FOLDER=$(cat $data | sed -n 2p)
329
     if [ ${#RULE_SUBJECT} -lt 2 ]; then
346
     if [ ${#RULE_SUBJECT} -lt 2 ]; then
330
         dialog --title $"Create an email rule" \
347
         dialog --title $"Create an email rule" \
331
                --msgbox $"No subject text was given" 6 40
348
                --msgbox $"No subject text was given" 6 40
349
+        rm $data
332
         return
350
         return
333
     fi
351
     fi
334
     if [ ${#RULE_FOLDER} -lt 2 ]; then
352
     if [ ${#RULE_FOLDER} -lt 2 ]; then
335
         dialog --title $"Create an email rule" \
353
         dialog --title $"Create an email rule" \
336
                --msgbox $"No folder name was given" 6 40
354
                --msgbox $"No folder name was given" 6 40
355
+        rm $data
337
         return
356
         return
338
     fi
357
     fi
339
 
358
 
341
                    -g "$RULE_FOLDER" --public $RULE_PUBLIC
360
                    -g "$RULE_FOLDER" --public $RULE_PUBLIC
342
     dialog --title $"Create an email rule" \
361
     dialog --title $"Create an email rule" \
343
            --msgbox $"Email rule for subject '$RULE_SUBJECT' was added" 6 40
362
            --msgbox $"Email rule for subject '$RULE_SUBJECT' was added" 6 40
363
+    rm $data
344
 }
364
 }
345
 
365
 
346
 function block_unblock_email {
366
 function block_unblock_email {
355
            2> $data
375
            2> $data
356
     sel=$?
376
     sel=$?
357
     case $sel in
377
     case $sel in
358
-        1) return;;
359
-        255) return;;
378
+        1) rm $data
379
+           return;;
380
+        255) rm $data
381
+             return;;
360
     esac
382
     esac
361
     BLOCK_EMAIL=$(cat $data | sed -n 1p)
383
     BLOCK_EMAIL=$(cat $data | sed -n 1p)
362
     BLOCK=$(cat $data | sed -n 2p)
384
     BLOCK=$(cat $data | sed -n 2p)
368
     if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
390
     if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
369
         dialog --title "$blockstr" \
391
         dialog --title "$blockstr" \
370
                --msgbox $"Unrecognised email address" 6 40
392
                --msgbox $"Unrecognised email address" 6 40
393
+        rm $data
371
         return
394
         return
372
     fi
395
     fi
373
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
396
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
379
         dialog --title $"Unblock an email" \
402
         dialog --title $"Unblock an email" \
380
                --msgbox "Email from $BLOCK_EMAIL is now unblocked" 6 75
403
                --msgbox "Email from $BLOCK_EMAIL is now unblocked" 6 75
381
     fi
404
     fi
405
+    rm $data
382
 }
406
 }
383
 
407
 
384
 function block_unblock_subject {
408
 function block_unblock_subject {
393
            2> $data
417
            2> $data
394
     sel=$?
418
     sel=$?
395
     case $sel in
419
     case $sel in
396
-        1) return;;
397
-        255) return;;
420
+        1) rm $data
421
+           return;;
422
+        255) rm $data
423
+             return;;
398
     esac
424
     esac
399
     BLOCK_SUBJECT=$(cat $data | sed -n 1p)
425
     BLOCK_SUBJECT=$(cat $data | sed -n 1p)
400
     BLOCK=$(cat $data | sed -n 2p)
426
     BLOCK=$(cat $data | sed -n 2p)
401
     if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
427
     if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
402
         dialog --title "$blockstr" \
428
         dialog --title "$blockstr" \
403
                --msgbox $"No subject was given" 6 40
429
                --msgbox $"No subject was given" 6 40
430
+        rm $data
404
         return
431
         return
405
     fi
432
     fi
406
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
433
     if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
412
         dialog --title $"Unblock an email" \
439
         dialog --title $"Unblock an email" \
413
                --msgbox $"Email with subject $BLOCK_SUBJECT is now unblocked" 6 40
440
                --msgbox $"Email with subject $BLOCK_SUBJECT is now unblocked" 6 40
414
     fi
441
     fi
442
+    rm $data
415
 }
443
 }
416
 
444
 
417
 function show_gpg_key {
445
 function show_gpg_key {
530
             fi
558
             fi
531
             ;;
559
             ;;
532
     esac
560
     esac
561
+    rm $data
533
 }
562
 }
534
 
563
 
535
 function add_ssh_key {
564
 function add_ssh_key {
568
             fi
597
             fi
569
             ;;
598
             ;;
570
     esac
599
     esac
600
+    rm $data
571
 }
601
 }
572
 
602
 
573
 function remove_ssh_key {
603
 function remove_ssh_key {
590
             fi
620
             fi
591
             ;;
621
             ;;
592
     esac
622
     esac
623
+    rm $data
593
 }
624
 }
594
 
625
 
595
 function smtp_proxy {
626
 function smtp_proxy {
631
            2> $data
662
            2> $data
632
     sel=$?
663
     sel=$?
633
     case $sel in
664
     case $sel in
634
-        1) return;;
635
-        255) return;;
665
+        1) rm $data
666
+           return;;
667
+        255) rm $data
668
+             return;;
636
     esac
669
     esac
637
     SMTP_PROXY_ENABLE=$(cat $data | sed -n 1p)
670
     SMTP_PROXY_ENABLE=$(cat $data | sed -n 1p)
638
     SMTP_PROXY_PROTOCOL=$(cat $data | sed -n 2p)
671
     SMTP_PROXY_PROTOCOL=$(cat $data | sed -n 2p)
654
             sed -i 's|set smtp_url|#set smtp_url|g' $MUTTRC_FILE
687
             sed -i 's|set smtp_url|#set smtp_url|g' $MUTTRC_FILE
655
         fi
688
         fi
656
     fi
689
     fi
690
+    rm $data
657
 }
691
 }
658
 
692
 
659
 function sign_gpg_key {
693
 function sign_gpg_key {
682
             fi
716
             fi
683
             ;;
717
             ;;
684
     esac
718
     esac
719
+    rm $data
685
 }
720
 }
686
 
721
 
687
 
722
 
702
             fi
737
             fi
703
             ;;
738
             ;;
704
     esac
739
     esac
740
+    rm $data
705
 }
741
 }
706
 
742
 
707
 function menu_encryption_keys {
743
 function menu_encryption_keys {
725
                11 $"Back to main menu" on 2> $data
761
                11 $"Back to main menu" on 2> $data
726
         sel=$?
762
         sel=$?
727
         case $sel in
763
         case $sel in
728
-            1) break;;
729
-            255) break;;
764
+            1) rm $data
765
+               break;;
766
+            255) rm $data
767
+                 break;;
730
         esac
768
         esac
731
         case $(cat $data) in
769
         case $(cat $data) in
732
             1) show_gpg_key;;
770
             1) show_gpg_key;;
739
             8) add_ssh_key;;
777
             8) add_ssh_key;;
740
             9) remove_ssh_key;;
778
             9) remove_ssh_key;;
741
             10) gpg_key_trust;;
779
             10) gpg_key_trust;;
742
-            11) break;;
780
+            11) rm $data
781
+                break;;
743
         esac
782
         esac
783
+        rm $data
744
     done
784
     done
745
 }
785
 }
746
 
786
 
761
                7 $"Back to main menu" on 2> $data
801
                7 $"Back to main menu" on 2> $data
762
         sel=$?
802
         sel=$?
763
         case $sel in
803
         case $sel in
764
-            1) break;;
765
-            255) break;;
804
+            1) rm $data
805
+               break;;
806
+            255) rm $data
807
+                 break;;
766
         esac
808
         esac
767
         case $(cat $data) in
809
         case $(cat $data) in
768
             1) add_to_mailing_list;;
810
             1) add_to_mailing_list;;
771
             4) email_rule_subject;;
813
             4) email_rule_subject;;
772
             5) block_unblock_email;;
814
             5) block_unblock_email;;
773
             6) block_unblock_subject;;
815
             6) block_unblock_subject;;
774
-            7) break;;
816
+            7) rm $data
817
+               break;;
775
         esac
818
         esac
819
+        rm $data
776
     done
820
     done
777
 }
821
 }
778
 
822
 
857
                9 $"Log out" on 2> $data
901
                9 $"Log out" on 2> $data
858
         sel=$?
902
         sel=$?
859
         case $sel in
903
         case $sel in
860
-            1) exit 1;;
861
-            255) exit 1;;
904
+            1) rm $data
905
+               exit 1;;
906
+            255) rm $data
907
+                 exit 1;;
862
         esac
908
         esac
863
         case $(cat $data) in
909
         case $(cat $data) in
864
             1) mutt;;
910
             1) mutt;;
868
             5) menu_encryption_keys;;
914
             5) menu_encryption_keys;;
869
             6) smtp_proxy;;
915
             6) smtp_proxy;;
870
             7) menu_admin;;
916
             7) menu_admin;;
871
-            8) break;;
917
+            8) rm $data
918
+               break;;
872
             9) kill -HUP `pgrep -s 0 -o`;;
919
             9) kill -HUP `pgrep -s 0 -o`;;
873
         esac
920
         esac
921
+        rm $data
874
     done
922
     done
875
 }
923
 }
876
 
924
 

+ 1
- 1
src/freedombone-freedns Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-image-customise Ver arquivo

909
     chroot "$rootdir" apt-get -yq install apt-transport-https
909
     chroot "$rootdir" apt-get -yq install apt-transport-https
910
 
910
 
911
     # install tor as a possible way of routing traffic between internet gateways
911
     # install tor as a possible way of routing traffic between internet gateways
912
-    chroot "$rootdir" apt-get -yq install tor
912
+    chroot "$rootdir" apt-get -yq -t stretch-backports install tor
913
 
913
 
914
     # dhcp daemon for hotspot on secondary wifi adapter
914
     # dhcp daemon for hotspot on secondary wifi adapter
915
     chroot "$rootdir" apt-get -yq install dnsmasq
915
     chroot "$rootdir" apt-get -yq install dnsmasq

+ 1
- 1
src/freedombone-keydrive Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2015-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-mesh-batman Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2015-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-pass Ver arquivo

22
 # License
22
 # License
23
 # =======
23
 # =======
24
 #
24
 #
25
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
25
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
26
 #
26
 #
27
 # This program is free software: you can redistribute it and/or modify
27
 # This program is free software: you can redistribute it and/or modify
28
 # it under the terms of the GNU Affero General Public License as published by
28
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-prepare-scripts Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 7
- 1
src/freedombone-upgrade Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2015-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by
97
         email_install_tls
97
         email_install_tls
98
         email_disable_chunking
98
         email_disable_chunking
99
         #defrag_filesystem
99
         #defrag_filesystem
100
+
101
+        # reinstall tor from backports
102
+        tor_version=$(tor --version)
103
+        if [[ "$tor_version" == *' 0.2'* ]]; then
104
+            echo 'N' | apt-get -yq -t stretch-backports install tor
105
+        fi
100
     fi
106
     fi
101
 fi
107
 fi
102
 
108
 

+ 16
- 91
src/freedombone-utils-backup Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by
255
     else
255
     else
256
         USE_MONGODB=
256
         USE_MONGODB=
257
         USE_POSTGRESQL=
257
         USE_POSTGRESQL=
258
+        cd /etc/postgresql
258
         sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension}
259
         sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension}
259
     fi
260
     fi
260
     if [ -f ${local_database_dir}/${1}.${database_file_extension} ]; then
261
     if [ -f ${local_database_dir}/${1}.${database_file_extension} ]; then
278
     echo $"Database dump was created for ${1}"
279
     echo $"Database dump was created for ${1}"
279
 }
280
 }
280
 
281
 
281
-function set_obnam_client_name {
282
-    # obnam can backup multiple machines with different domain names to
283
-    # a repository. To be able to restore directories from different
284
-    # machines we need to enforce a single client name for all backups
285
-    echo '[config]' > /etc/obnam.conf
286
-    echo "client-name = ${PROJECT_NAME}" >> /etc/obnam.conf
287
-}
288
-
289
 function backup_directory_to_usb_duplicity {
282
 function backup_directory_to_usb_duplicity {
290
     create_backups_temp_directory
283
     create_backups_temp_directory
291
     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}
284
     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}
319
     remove_backups_temp_directory
312
     remove_backups_temp_directory
320
 }
313
 }
321
 
314
 
322
-function backup_directory_to_usb_obnam {
323
-    set_obnam_client_name
324
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam force-lock -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}
325
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam backup -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}
326
-    if [[ $ENABLE_BACKUP_VERIFICATION == "yes" ]]; then
327
-        echo "$BACKUP_DUMMY_PASSWORD" | obnam verify -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID ${1}
328
-        if [ ! "$?" = "0" ]; then
329
-            umount $USB_MOUNT
330
-            rm -rf $USB_MOUNT
331
-            if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
332
-                shred -zu ${1}/*
333
-                rm -rf ${1}
334
-            fi
335
-            function_check restart_site
336
-            restart_site
337
-            exit 683252
338
-        fi
339
-    fi
340
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam forget --keep=30d -r $USB_MOUNT/backup/${2} --encrypt-with $MY_BACKUP_KEY_ID
341
-    if [ ! "$?" = "0" ]; then
342
-        umount $USB_MOUNT
343
-        rm -rf $USB_MOUNT
344
-        if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
345
-            shred -zu ${1}/*
346
-            rm -rf ${1}
347
-        fi
348
-        function_check restart_site
349
-        restart_site
350
-        exit 7
351
-    fi
352
-}
353
-
354
 function backup_directory_to_usb {
315
 function backup_directory_to_usb {
355
     if [ ! -d ${1} ]; then
316
     if [ ! -d ${1} ]; then
356
         echo $"WARNING: directory does not exist: ${1}"
317
         echo $"WARNING: directory does not exist: ${1}"
369
         fi
330
         fi
370
 
331
 
371
         backup_directory_to_usb_duplicity ${1} ${2}
332
         backup_directory_to_usb_duplicity ${1} ${2}
372
-        #backup_directory_to_usb_obnam ${1} ${2}
373
 
333
 
374
         if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
334
         if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
375
             shred -zu ${1}/*
335
             shred -zu ${1}/*
378
     fi
338
     fi
379
 }
339
 }
380
 
340
 
381
-function restore_directory_from_usb_obnam {
382
-    set_obnam_client_name
383
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam restore -r $USB_MOUNT/backup/${2} --to ${1}
384
-}
385
-
386
 function restore_directory_from_usb_duplicity {
341
 function restore_directory_from_usb_duplicity {
387
     create_backups_temp_directory
342
     create_backups_temp_directory
388
     PASSPHRASE="$BACKUP_DUMMY_PASSWORD" duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1}
343
     PASSPHRASE="$BACKUP_DUMMY_PASSWORD" duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1}
408
         mkdir ${1}
363
         mkdir ${1}
409
     fi
364
     fi
410
     restore_directory_from_usb_duplicity ${1} ${2}
365
     restore_directory_from_usb_duplicity ${1} ${2}
411
-    #restore_directory_from_usb_obnam ${1} ${2}
412
-}
413
-
414
-function restore_directory_from_friend_obnam {
415
-    set_obnam_client_name
416
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}
417
 }
366
 }
418
 
367
 
419
 function restore_directory_from_friend_duplicity {
368
 function restore_directory_from_friend_duplicity {
425
 
374
 
426
 function restore_directory_from_friend {
375
 function restore_directory_from_friend {
427
     if [ ! ${1} ]; then
376
     if [ ! ${1} ]; then
428
-        echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}"
429
         echo $'No restore destination given'
377
         echo $'No restore destination given'
430
         return
378
         return
431
     fi
379
     fi
432
     if [ ! ${2} ]; then
380
     if [ ! ${2} ]; then
433
-        echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}"
434
         echo $'No restore source given'
381
         echo $'No restore source given'
435
         return
382
         return
436
     fi
383
     fi
438
         mkdir ${1}
385
         mkdir ${1}
439
     fi
386
     fi
440
     restore_directory_from_friend_duplicity ${1} ${2}
387
     restore_directory_from_friend_duplicity ${1} ${2}
441
-    #restore_directory_from_friend_obnam ${1} ${2}
442
 }
388
 }
443
 
389
 
444
 function backup_database_to_usb {
390
 function backup_database_to_usb {
492
     remove_backups_temp_directory
438
     remove_backups_temp_directory
493
 }
439
 }
494
 
440
 
495
-function backup_directory_to_friend_obnam {
496
-    set_obnam_client_name
497
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam force-lock -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID} ${1}
498
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam backup -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID} ${1}
499
-    if [[ $ENABLE_VERIFICATION == "yes" ]]; then
500
-        echo "$BACKUP_DUMMY_PASSWORD" | obnam verify -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID} ${1}
501
-        if [ ! "$?" = "0" ]; then
502
-            if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
503
-                shred -zu /root/temp${2}/*
504
-                rm -rf /root/temp${2}
505
-            fi
506
-            # Send a warning email
507
-            echo "Unable to verify ${2}" | mail -s "${PROJECT_NAME} backup to friends" ${ADMIN_EMAIL_ADDRESS}
508
-            function_check restart_site
509
-            restart_site
510
-            exit 953
511
-        fi
512
-    fi
513
-    echo "$BACKUP_DUMMY_PASSWORD" | obnam forget --keep=30d -r $SERVER_DIRECTORY/backup/${2} --encrypt-with ${ADMIN_BACKUP_KEY_ID}
514
-    if [ ! "$?" = "0" ]; then
515
-        if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
516
-            shred -zu /root/temp${2}/*
517
-            rm -rf /root/temp${2}
518
-        fi
519
-        # Send a warning email
520
-        echo "Unable to backup ${2}" | mail -s "${PROJECT_NAME} backup to friends" ${ADMIN_EMAIL_ADDRESS}
521
-        function_check restart_site
522
-        restart_site
523
-        exit 853
524
-    fi
525
-}
526
-
527
 function backup_directory_to_friend {
441
 function backup_directory_to_friend {
528
     BACKUP_KEY_EXISTS=$(gpg --list-keys "$ADMIN_NAME (backup key)")
442
     BACKUP_KEY_EXISTS=$(gpg --list-keys "$ADMIN_NAME (backup key)")
529
     if [ ! "$?" = "0" ]; then
443
     if [ ! "$?" = "0" ]; then
539
     fi
453
     fi
540
 
454
 
541
     backup_directory_to_friend_duplicity ${1} ${2}
455
     backup_directory_to_friend_duplicity ${1} ${2}
542
-    #backup_directory_to_friend_obnam ${1} ${2}
543
 
456
 
544
     if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
457
     if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
545
         shred -zu /root/temp${2}/*
458
         shred -zu /root/temp${2}/*
585
     else
498
     else
586
         USE_MONGODB=
499
         USE_MONGODB=
587
         USE_POSTGRESQL=
500
         USE_POSTGRESQL=
501
+        cd /etc/postgresql
588
         sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension}
502
         sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension}
589
     fi
503
     fi
590
 
504
 
669
     DATABASE_PASSWORD=
583
     DATABASE_PASSWORD=
670
     RESTORE_SUBDIR="root"
584
     RESTORE_SUBDIR="root"
671
 
585
 
672
-    if [ -d $SERVER_DIRECTORY/backup/${1} ]; then
586
+    if [ -d $SERVER_DIRECTORY/backup/${1}data ]; then
673
         database_file_extension='sql'
587
         database_file_extension='sql'
674
         if [ $USE_MONGODB ]; then
588
         if [ $USE_MONGODB ]; then
675
             database_file_extension='mdb'
589
             database_file_extension='mdb'
701
         else
615
         else
702
             USE_MONGODB=
616
             USE_MONGODB=
703
             USE_POSTGRESQL=
617
             USE_POSTGRESQL=
618
+            cd /etc/postgresql
704
             mysqlsuccess=$(sudo -u postgres pg_restore ${database_file})
619
             mysqlsuccess=$(sudo -u postgres pg_restore ${database_file})
705
         fi
620
         fi
706
         if [ ! "$?" = "0" ]; then
621
         if [ ! "$?" = "0" ]; then
751
                 fi
666
                 fi
752
             fi
667
             fi
753
         fi
668
         fi
669
+    else
670
+        echo $"No database backup found for ${1}"
671
+        exit 6239353
754
     fi
672
     fi
755
 }
673
 }
756
 
674
 
759
     restore_app_name=$1
677
     restore_app_name=$1
760
     restore_app_domain=$2
678
     restore_app_domain=$2
761
 
679
 
762
-    if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then
680
+    if [ -d $USB_MOUNT/backup/${restore_app_name}data ]; then
763
         echo $"Restoring ${restore_app_name} database"
681
         echo $"Restoring ${restore_app_name} database"
764
         local_database_dir=/root/temp${restore_app_name}data
682
         local_database_dir=/root/temp${restore_app_name}data
765
         if [ -d ${local_database_dir} ]; then
683
         if [ -d ${local_database_dir} ]; then
790
                 USE_MONGODB=
708
                 USE_MONGODB=
791
                 USE_POSTGRESQL=
709
                 USE_POSTGRESQL=
792
                 keep_database_running
710
                 keep_database_running
711
+                cp $database_file ~/test.sql
793
                 mysqlsuccess=$(mysql -u root --password="$DATABASE_PASSWORD" ${restore_app_name} -o < $database_file)
712
                 mysqlsuccess=$(mysql -u root --password="$DATABASE_PASSWORD" ${restore_app_name} -o < $database_file)
794
             else
713
             else
795
                 USE_MONGODB=
714
                 USE_MONGODB=
799
         else
718
         else
800
             USE_MONGODB=
719
             USE_MONGODB=
801
             USE_POSTGRESQL=
720
             USE_POSTGRESQL=
721
+            cd /etc/postgresql
802
             mysqlsuccess=$(sudo -u postgres pg_restore $database_file)
722
             mysqlsuccess=$(sudo -u postgres pg_restore $database_file)
803
         fi
723
         fi
804
         if [ ! "$?" = "0" ]; then
724
         if [ ! "$?" = "0" ]; then
859
                 fi
779
                 fi
860
             fi
780
             fi
861
         fi
781
         fi
782
+    else
783
+        echo $"No database backup found for ${restore_app_name}"
784
+        set_user_permissions
785
+        backup_unmount_drive
786
+        exit 7357224
862
     fi
787
     fi
863
 }
788
 }
864
 
789
 

+ 1
- 1
src/freedombone-utils-database Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-firewall Ver arquivo

15
 # License
15
 # License
16
 # =======
16
 # =======
17
 #
17
 #
18
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
18
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
19
 #
19
 #
20
 # This program is free software: you can redistribute it and/or modify
20
 # This program is free software: you can redistribute it and/or modify
21
 # it under the terms of the GNU Affero General Public License as published by
21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-gnusocialtools Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-gpg Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2016-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-guile Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-meteor Ver arquivo

14
 # License
14
 # License
15
 # =======
15
 # =======
16
 #
16
 #
17
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
17
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
18
 #
18
 #
19
 # This program is free software: you can redistribute it and/or modify
19
 # This program is free software: you can redistribute it and/or modify
20
 # it under the terms of the GNU Affero General Public License as published by
20
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-mongodb Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-nodejs Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-onion Ver arquivo

270
         return
270
         return
271
     fi
271
     fi
272
 
272
 
273
-    apt-get -yq install tor
273
+    apt-get -yq -t stretch-backports install tor
274
     if [ ! -f /etc/tor/torrc ]; then
274
     if [ ! -f /etc/tor/torrc ]; then
275
         echo 'Tor failed to install'
275
         echo 'Tor failed to install'
276
         exit 38259
276
         exit 38259

+ 1
- 1
src/freedombone-utils-postgresql Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2017-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 5
- 2
src/freedombone-utils-setup Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by
545
 
545
 
546
 function lockdown_permissions {
546
 function lockdown_permissions {
547
     if [ -d /root/.npm ]; then
547
     if [ -d /root/.npm ]; then
548
-        find /root/.npm -name package.json -exec chmod 700 {} \;
548
+        chmod -R 700 /root/.npm
549
     fi
549
     fi
550
 
550
 
551
     # All commands owned by root
551
     # All commands owned by root
593
         if [ -d /usr/lib/node_modules ]; then
593
         if [ -d /usr/lib/node_modules ]; then
594
             chmod -R 750 /usr/lib/node_modules/*
594
             chmod -R 750 /usr/lib/node_modules/*
595
         fi
595
         fi
596
+        if [ -d /usr/lib/prosody ]; then
597
+            chown -R prosody:prosody /usr/lib/prosody
598
+        fi
596
     fi
599
     fi
597
     if [ -d /usr/lib64 ]; then
600
     if [ -d /usr/lib64 ]; then
598
         chown -R root:root /usr/lib64/*
601
         chown -R root:root /usr/lib64/*

+ 1
- 1
src/freedombone-utils-ssh Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-web Ver arquivo

13
 # License
13
 # License
14
 # =======
14
 # =======
15
 #
15
 #
16
-# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
17
 #
17
 #
18
 # This program is free software: you can redistribute it and/or modify
18
 # This program is free software: you can redistribute it and/or modify
19
 # it under the terms of the GNU Affero General Public License as published by
19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
tests/check-libs-owner.sh Ver arquivo

22
 fi
22
 fi
23
 if [ -d "/usr/lib" ];then
23
 if [ -d "/usr/lib" ];then
24
 
24
 
25
-    COUNT=$(find -L /usr/lib  \! -user root  -exec ls -l {} \; |wc -l)
25
+    COUNT=$(find -L /usr/lib -path /usr/lib/prosody -prune -o \! -user root  -exec ls -l {} \; |wc -l)
26
 
26
 
27
     if [ $COUNT -eq 0 ];then
27
     if [ $COUNT -eq 0 ];then
28
         :
28
         :

+ 2
- 2
tests/output.sh Ver arquivo

254
               fi
254
               fi
255
               ;;
255
               ;;
256
     V-51391)  if [ "$3" = "en" ]; then
256
     V-51391)  if [ "$3" = "en" ]; then
257
-                  log_msg $2 'A file integrity baseline must be created.'
257
+                  log_msg $2 'A file integrity baseline must be created. Reset the tripwire from the administrator control panel.'
258
               else
258
               else
259
                   log_msg $2 '必须创建文件完整性基线。'
259
                   log_msg $2 '必须创建文件完整性基线。'
260
               fi
260
               fi
487
               fi
487
               fi
488
               find -L /lib  \! -user root  -exec ls -l {} \; | grep -v '> /dev/null'
488
               find -L /lib  \! -user root  -exec ls -l {} \; | grep -v '> /dev/null'
489
               find -L /lib64  \! -user root  -exec ls -l {} \;
489
               find -L /lib64  \! -user root  -exec ls -l {} \;
490
-              find -L /usr/lib  \! -user root  -exec ls -l {} \;
490
+              find -L /usr/lib -path /usr/lib/prosody -prune -o \! -user root  -exec ls -l {} \;
491
               if [ -d /usr/lib64 ]; then
491
               if [ -d /usr/lib64 ]; then
492
                   find -L /usr/lib64  \! -user root  -exec ls -l {} \;
492
                   find -L /usr/lib64  \! -user root  -exec ls -l {} \;
493
               fi
493
               fi

+ 14
- 5
website/EN/debianinstall.html Ver arquivo

3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
 <head>
5
 <head>
6
-<!-- 2017-06-25 Sun 23:22 -->
6
+<!-- 2018-01-23 Tue 20:50 -->
7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9
-<title></title>
9
+<title>&lrm;</title>
10
 <meta name="generator" content="Org mode" />
10
 <meta name="generator" content="Org mode" />
11
 <meta name="author" content="Bob Mottram" />
11
 <meta name="author" content="Bob Mottram" />
12
 <meta name="description" content="How to install Freedombone onto an existing Debian system"
12
 <meta name="description" content="How to install Freedombone onto an existing Debian system"
257
 </p>
257
 </p>
258
 
258
 
259
 <div class="org-src-container">
259
 <div class="org-src-container">
260
-<pre><code class="src src-bash">su
260
+<pre class="src src-bash">su
261
 apt-get update
261
 apt-get update
262
 apt-get -qy install build-essential git dialog
262
 apt-get -qy install build-essential git dialog
263
 git clone https://github.com/bashrc/freedombone
263
 git clone https://github.com/bashrc/freedombone
264
 <span class="org-builtin">cd</span> freedombone
264
 <span class="org-builtin">cd</span> freedombone
265
 git checkout stretch
265
 git checkout stretch
266
 make install
266
 make install
267
-freedombone makeconfig
268
-</code></pre>
267
+freedombone menuconfig (or freedombone menuconfig-onion)
268
+</pre>
269
 </div>
269
 </div>
270
 
270
 
271
 <p>
271
 <p>
272
 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.
272
 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.
273
 </p>
273
 </p>
274
+
275
+<p>
276
+Once installed you can then log in from another system with:
277
+</p>
278
+
279
+<div class="org-src-container">
280
+<pre class="src src-bash">ssh yourusername@freedombone.local -p 2222
281
+</pre>
282
+</div>
274
 </div>
283
 </div>
275
 <div id="postamble" class="status">
284
 <div id="postamble" class="status">
276
 
285