소스 검색

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

Bob Mottram 7 년 전
부모
커밋
f85c6a9b5b
65개의 변경된 파일344개의 추가작업 그리고 622개의 파일을 삭제
  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 파일 보기

@@ -28,7 +28,13 @@ git clone https://github.com/bashrc/freedombone
28 28
 cd freedombone
29 29
 git checkout stretch
30 30
 make install
31
-freedombone makeconfig
31
+freedombone menuconfig (or freedombone menuconfig-onion)
32 32
 #+END_SRC
33 33
 
34 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 파일 보기


+ 1
- 1
src/freedombone 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-akaunting 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-cryptpad 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-dokuwiki 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-etherpad 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-friendica 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-gnusocial 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-gogs 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-hubzilla 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-icecast 파일 보기

@@ -17,7 +17,7 @@
17 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 22
 # This program is free software: you can redistribute it and/or modify
23 23
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-jitsi 파일 보기

@@ -15,7 +15,7 @@
15 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 20
 # This program is free software: you can redistribute it and/or modify
21 21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-kanboard 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-keyserver 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-koel 파일 보기

@@ -14,7 +14,7 @@
14 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 19
 # This program is free software: you can redistribute it and/or modify
20 20
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-lychee 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-mailpile 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-matrix 파일 보기

@@ -20,7 +20,7 @@
20 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 25
 # This program is free software: you can redistribute it and/or modify
26 26
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-mediagoblin 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-movim 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-nextcloud 파일 보기

@@ -15,7 +15,7 @@
15 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 20
 # This program is free software: you can redistribute it and/or modify
21 21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-peertube 파일 보기

@@ -16,7 +16,7 @@
16 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 21
 # This program is free software: you can redistribute it and/or modify
22 22
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-pelican 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 25
- 1
src/freedombone-app-pleroma 파일 보기

@@ -875,6 +875,9 @@ function install_pleroma {
875 875
     if [[ $ONION_ONLY == "no" ]]; then
876 876
         function_check nginx_http_redirect
877 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 881
         echo 'server {' >> $pleroma_nginx_site
879 882
         echo '  listen 443 ssl;' >> $pleroma_nginx_site
880 883
         echo '  listen [::]:443 ssl;' >> $pleroma_nginx_site
@@ -902,12 +905,23 @@ function install_pleroma {
902 905
         echo '  location / {' >> $pleroma_nginx_site
903 906
         function_check nginx_limits
904 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 918
         echo "    proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
906 919
         echo '  }' >> $pleroma_nginx_site
907 920
         echo '  # include snippets/well-known.conf;' >> $pleroma_nginx_site
908 921
         echo '}' >> $pleroma_nginx_site
909 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 925
     fi
912 926
     echo 'server {' >> $pleroma_nginx_site
913 927
     echo "    listen 127.0.0.1:$PLEROMA_ONION_PORT default_server;" >> $pleroma_nginx_site
@@ -929,6 +943,16 @@ function install_pleroma {
929 943
     echo '  location / {' >> $pleroma_nginx_site
930 944
     function_check nginx_limits
931 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 956
     echo "    proxy_pass http://localhost:$PLEROMA_PORT;" >> $pleroma_nginx_site
933 957
     echo '  }' >> $pleroma_nginx_site
934 958
     echo '  # include snippets/well-known.conf;' >> $pleroma_nginx_site

+ 1
- 1
src/freedombone-app-postactiv 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-profanity 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-riot 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 24
- 13
src/freedombone-app-rss 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by
@@ -149,10 +149,11 @@ function upgrade_rss {
149 149
 
150 150
 function backup_local_rss {
151 151
     if [ -d /etc/share/tt-rss ]; then
152
-        RSS_READER_DOMAIN_NAME=$(get_completion_param "rss reader domain")
153
-
154 152
         echo $"Backing up ttrss"
155 153
 
154
+        function_check get_mariadb_password
155
+        get_mariadb_password
156
+
156 157
         function_check backup_database_to_usb
157 158
         backup_database_to_usb ttrss
158 159
 
@@ -165,10 +166,11 @@ function backup_local_rss {
165 166
 function restore_local_rss {
166 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 175
     if [ -d /etc/share/tt-rss ]; then
174 176
         if [ -d $temp_restore_dir/etc/share/tt-rss ]; then
@@ -176,6 +178,9 @@ function restore_local_rss {
176 178
                 rm -rf /etc/share/tt-rss
177 179
                 mv $temp_restore_dir/etc/share/tt-rss /etc/share/
178 180
             else
181
+                if [ ! -d /etc/share/tt-rss ]; then
182
+                    mkdir -p /etc/share/tt-rss
183
+                fi
179 184
                 cp -r $temp_restore_dir/* /etc/share/tt-rss/
180 185
             fi
181 186
             if [ ! "$?" = "0" ]; then
@@ -216,7 +221,10 @@ function restore_local_rss {
216 221
 function backup_remote_rss {
217 222
     if [ -d /etc/share/tt-rss ]; then
218 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 229
         function_check backup_database_to_friend
222 230
         backup_database_to_friend ttrss
@@ -229,7 +237,8 @@ function backup_remote_rss {
229 237
         function_check restart_site
230 238
         restart_site
231 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 242
     fi
234 243
 }
235 244
 
@@ -237,18 +246,20 @@ function restore_remote_rss {
237 246
     temp_restore_dir=/root/tempttrss
238 247
     if grep -q "rss reader domain" $COMPLETION_FILE; then
239 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 255
         if [ -d /etc/share/tt-rss ]; then
248 256
             if [ -d $temp_restore_dir/etc/share/tt-rss ]; then
249 257
                 rm -rf /etc/share/tt-rss
250 258
                 mv $temp_restore_dir/etc/share/tt-rss /etc/share/
251 259
             else
260
+                if [ ! -d /etc/share/tt-rss ]; then
261
+                    mkdir -p /etc/share/tt-rss
262
+                fi
252 263
                 cp -r $temp_restore_dir/* /etc/share/tt-rss/
253 264
             fi
254 265
             if [ ! "$?" = "0" ]; then

+ 1
- 1
src/freedombone-app-scuttlebot 파일 보기

@@ -14,7 +14,7 @@
14 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 19
 # This program is free software: you can redistribute it and/or modify
20 20
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-searx 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 0
- 381
src/freedombone-app-smilodon 파일 보기

@@ -1,381 +0,0 @@
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 파일 보기

@@ -15,7 +15,7 @@
15 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 20
 # This program is free software: you can redistribute it and/or modify
21 21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-vpn 파일 보기

@@ -16,7 +16,7 @@
16 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 21
 # This program is free software: you can redistribute it and/or modify
22 22
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-app-wekan 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 5
- 1
src/freedombone-app-xmpp 파일 보기

@@ -10,10 +10,14 @@
10 10
 #
11 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 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 22
 # This program is free software: you can redistribute it and/or modify
19 23
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-base-email 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 13
src/freedombone-client 파일 보기

@@ -36,7 +36,6 @@ CURR_GROUP=$USER
36 36
 if [ -f /usr/bin/pacman ]; then
37 37
     CURR_GROUP='users'
38 38
 fi
39
-MESH_CLIENT_INSTALL=
40 39
 ENABLE_MONKEYSPHERE=
41 40
 
42 41
 # setup for a specific app
@@ -211,7 +210,7 @@ function configure_monkeysphere {
211 210
 
212 211
 function show_help {
213 212
     echo ''
214
-    echo $"${PROJECT_NAME}-client --mesh [yes|no] --monkeysphere [yes|no]"
213
+    echo $"${PROJECT_NAME}-client --monkeysphere [yes|no]"
215 214
     echo ''
216 215
     exit 0
217 216
 }
@@ -319,10 +318,6 @@ do
319 318
             verify_ssh_server_key
320 319
             exit 0
321 320
             ;;
322
-        -m|--mesh)
323
-            shift
324
-            MESH_CLIENT_INSTALL=${1}
325
-            ;;
326 321
         --monkeysphere|--ms|--monkey)
327 322
             shift
328 323
             ENABLE_MONKEYSPHERE=${1}
@@ -342,12 +337,5 @@ configure_ssh_client
342 337
 global_rate_limit
343 338
 configure_monkeysphere
344 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 340
 echo $'Configuration complete'
353 341
 exit 0

+ 1
- 1
src/freedombone-config 파일 보기

@@ -14,7 +14,7 @@
14 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 19
 # This program is free software: you can redistribute it and/or modify
20 20
 # it under the terms of the GNU Affero General Public License as published by

+ 115
- 36
src/freedombone-controlpanel 파일 보기

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

+ 72
- 24
src/freedombone-controlpanel-user 파일 보기

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

+ 1
- 1
src/freedombone-freedns 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-image-customise 파일 보기

@@ -909,7 +909,7 @@ initialise_mesh() {
909 909
     chroot "$rootdir" apt-get -yq install apt-transport-https
910 910
 
911 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 914
     # dhcp daemon for hotspot on secondary wifi adapter
915 915
     chroot "$rootdir" apt-get -yq install dnsmasq

+ 1
- 1
src/freedombone-keydrive 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-mesh-batman 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-pass 파일 보기

@@ -22,7 +22,7 @@
22 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 27
 # This program is free software: you can redistribute it and/or modify
28 28
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-prepare-scripts 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 7
- 1
src/freedombone-upgrade 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by
@@ -97,6 +97,12 @@ if [ -d $PROJECT_DIR ]; then
97 97
         email_install_tls
98 98
         email_disable_chunking
99 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 106
     fi
101 107
 fi
102 108
 

+ 16
- 91
src/freedombone-utils-backup 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by
@@ -255,6 +255,7 @@ function backup_database_local_usb {
255 255
     else
256 256
         USE_MONGODB=
257 257
         USE_POSTGRESQL=
258
+        cd /etc/postgresql
258 259
         sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension}
259 260
     fi
260 261
     if [ -f ${local_database_dir}/${1}.${database_file_extension} ]; then
@@ -278,14 +279,6 @@ function backup_database_local_usb {
278 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 282
 function backup_directory_to_usb_duplicity {
290 283
     create_backups_temp_directory
291 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,38 +312,6 @@ function backup_directory_to_usb_duplicity {
319 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 315
 function backup_directory_to_usb {
355 316
     if [ ! -d ${1} ]; then
356 317
         echo $"WARNING: directory does not exist: ${1}"
@@ -369,7 +330,6 @@ function backup_directory_to_usb {
369 330
         fi
370 331
 
371 332
         backup_directory_to_usb_duplicity ${1} ${2}
372
-        #backup_directory_to_usb_obnam ${1} ${2}
373 333
 
374 334
         if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
375 335
             shred -zu ${1}/*
@@ -378,11 +338,6 @@ function backup_directory_to_usb {
378 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 341
 function restore_directory_from_usb_duplicity {
387 342
     create_backups_temp_directory
388 343
     PASSPHRASE="$BACKUP_DUMMY_PASSWORD" duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1}
@@ -408,12 +363,6 @@ function restore_directory_from_usb {
408 363
         mkdir ${1}
409 364
     fi
410 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 368
 function restore_directory_from_friend_duplicity {
@@ -425,12 +374,10 @@ function restore_directory_from_friend_duplicity {
425 374
 
426 375
 function restore_directory_from_friend {
427 376
     if [ ! ${1} ]; then
428
-        echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}"
429 377
         echo $'No restore destination given'
430 378
         return
431 379
     fi
432 380
     if [ ! ${2} ]; then
433
-        echo "obnam restore -r $SERVER_DIRECTORY/backup/${2} --to ${1}"
434 381
         echo $'No restore source given'
435 382
         return
436 383
     fi
@@ -438,7 +385,6 @@ function restore_directory_from_friend {
438 385
         mkdir ${1}
439 386
     fi
440 387
     restore_directory_from_friend_duplicity ${1} ${2}
441
-    #restore_directory_from_friend_obnam ${1} ${2}
442 388
 }
443 389
 
444 390
 function backup_database_to_usb {
@@ -492,38 +438,6 @@ function backup_directory_to_friend_duplicity {
492 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 441
 function backup_directory_to_friend {
528 442
     BACKUP_KEY_EXISTS=$(gpg --list-keys "$ADMIN_NAME (backup key)")
529 443
     if [ ! "$?" = "0" ]; then
@@ -539,7 +453,6 @@ function backup_directory_to_friend {
539 453
     fi
540 454
 
541 455
     backup_directory_to_friend_duplicity ${1} ${2}
542
-    #backup_directory_to_friend_obnam ${1} ${2}
543 456
 
544 457
     if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
545 458
         shred -zu /root/temp${2}/*
@@ -585,6 +498,7 @@ function backup_database_remote {
585 498
     else
586 499
         USE_MONGODB=
587 500
         USE_POSTGRESQL=
501
+        cd /etc/postgresql
588 502
         sudo -u postgres pg_dump ${1} > ${local_database_dir}/${1}.${database_file_extension}
589 503
     fi
590 504
 
@@ -669,7 +583,7 @@ function restore_database_from_friend {
669 583
     DATABASE_PASSWORD=
670 584
     RESTORE_SUBDIR="root"
671 585
 
672
-    if [ -d $SERVER_DIRECTORY/backup/${1} ]; then
586
+    if [ -d $SERVER_DIRECTORY/backup/${1}data ]; then
673 587
         database_file_extension='sql'
674 588
         if [ $USE_MONGODB ]; then
675 589
             database_file_extension='mdb'
@@ -701,6 +615,7 @@ function restore_database_from_friend {
701 615
         else
702 616
             USE_MONGODB=
703 617
             USE_POSTGRESQL=
618
+            cd /etc/postgresql
704 619
             mysqlsuccess=$(sudo -u postgres pg_restore ${database_file})
705 620
         fi
706 621
         if [ ! "$?" = "0" ]; then
@@ -751,6 +666,9 @@ function restore_database_from_friend {
751 666
                 fi
752 667
             fi
753 668
         fi
669
+    else
670
+        echo $"No database backup found for ${1}"
671
+        exit 6239353
754 672
     fi
755 673
 }
756 674
 
@@ -759,7 +677,7 @@ function restore_database {
759 677
     restore_app_name=$1
760 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 681
         echo $"Restoring ${restore_app_name} database"
764 682
         local_database_dir=/root/temp${restore_app_name}data
765 683
         if [ -d ${local_database_dir} ]; then
@@ -790,6 +708,7 @@ function restore_database {
790 708
                 USE_MONGODB=
791 709
                 USE_POSTGRESQL=
792 710
                 keep_database_running
711
+                cp $database_file ~/test.sql
793 712
                 mysqlsuccess=$(mysql -u root --password="$DATABASE_PASSWORD" ${restore_app_name} -o < $database_file)
794 713
             else
795 714
                 USE_MONGODB=
@@ -799,6 +718,7 @@ function restore_database {
799 718
         else
800 719
             USE_MONGODB=
801 720
             USE_POSTGRESQL=
721
+            cd /etc/postgresql
802 722
             mysqlsuccess=$(sudo -u postgres pg_restore $database_file)
803 723
         fi
804 724
         if [ ! "$?" = "0" ]; then
@@ -859,6 +779,11 @@ function restore_database {
859 779
                 fi
860 780
             fi
861 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 787
     fi
863 788
 }
864 789
 

+ 1
- 1
src/freedombone-utils-database 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-firewall 파일 보기

@@ -15,7 +15,7 @@
15 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 20
 # This program is free software: you can redistribute it and/or modify
21 21
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-gnusocialtools 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-gpg 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-guile 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-meteor 파일 보기

@@ -14,7 +14,7 @@
14 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 19
 # This program is free software: you can redistribute it and/or modify
20 20
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-mongodb 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-nodejs 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-onion 파일 보기

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

+ 1
- 1
src/freedombone-utils-postgresql 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 5
- 2
src/freedombone-utils-setup 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by
@@ -545,7 +545,7 @@ function disable_ctrl_alt_del {
545 545
 
546 546
 function lockdown_permissions {
547 547
     if [ -d /root/.npm ]; then
548
-        find /root/.npm -name package.json -exec chmod 700 {} \;
548
+        chmod -R 700 /root/.npm
549 549
     fi
550 550
 
551 551
     # All commands owned by root
@@ -593,6 +593,9 @@ function lockdown_permissions {
593 593
         if [ -d /usr/lib/node_modules ]; then
594 594
             chmod -R 750 /usr/lib/node_modules/*
595 595
         fi
596
+        if [ -d /usr/lib/prosody ]; then
597
+            chown -R prosody:prosody /usr/lib/prosody
598
+        fi
596 599
     fi
597 600
     if [ -d /usr/lib64 ]; then
598 601
         chown -R root:root /usr/lib64/*

+ 1
- 1
src/freedombone-utils-ssh 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
src/freedombone-utils-web 파일 보기

@@ -13,7 +13,7 @@
13 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 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by

+ 1
- 1
tests/check-libs-owner.sh 파일 보기

@@ -22,7 +22,7 @@ if [ -d "/lib64" ];then
22 22
 fi
23 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 27
     if [ $COUNT -eq 0 ];then
28 28
         :

+ 2
- 2
tests/output.sh 파일 보기

@@ -254,7 +254,7 @@ an administrator.\n\n######################\n\n' >> $LOG
254 254
               fi
255 255
               ;;
256 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 258
               else
259 259
                   log_msg $2 '必须创建文件完整性基线。'
260 260
               fi
@@ -487,7 +487,7 @@ time, are stored in the following directories by default:\n\n/lib\n/lib64\n/usr/
487 487
               fi
488 488
               find -L /lib  \! -user root  -exec ls -l {} \; | grep -v '> /dev/null'
489 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 491
               if [ -d /usr/lib64 ]; then
492 492
                   find -L /usr/lib64  \! -user root  -exec ls -l {} \;
493 493
               fi

+ 14
- 5
website/EN/debianinstall.html 파일 보기

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