ソースを参照

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

Bob Mottram 6 年 前
コミット
4985cb396e
共有100 個のファイルを変更した1211 個の追加181 個の削除を含む
  1. 2
    0
      Makefile
  2. 2
    2
      README.md
  3. 1
    1
      doc/EN/app_bdsmail.org
  4. 0
    2
      doc/EN/app_dlna.org
  5. 28
    0
      doc/EN/app_rocketchat.org
  6. 29
    0
      doc/EN/app_smolrss.org
  7. 4
    1
      doc/EN/app_syncthing.org
  8. 0
    3
      doc/EN/app_xmpp.org
  9. 11
    3
      doc/EN/apps.org
  10. 1
    1
      doc/EN/armbian.org
  11. 1
    0
      doc/EN/boards.org
  12. 2
    1
      doc/EN/devguide.org
  13. 1
    1
      doc/EN/homeserver.org
  14. 2
    2
      doc/EN/index.org
  15. 1
    1
      doc/EN/installation.org
  16. 4
    4
      doc/EN/mesh_images.org
  17. 1
    1
      doc/EN/release3.org
  18. 1
    1
      doc/EN/release31.org
  19. 1
    1
      doc/EN/socialinstance.org
  20. 23
    5
      doc/EN/support.org
  21. バイナリ
      image_build/prosody-0.10-1nightly468.tar.gz
  22. バイナリ
      image_build/prosody-0.10-1nightly478.tar.gz
  23. バイナリ
      img/android-app/akaunting.png
  24. バイナリ
      img/android-app/bludit.png
  25. バイナリ
      img/android-app/dlna.png
  26. バイナリ
      img/android-app/dokuwiki.png
  27. バイナリ
      img/android-app/edith.png
  28. バイナリ
      img/android-app/etherpad.png
  29. バイナリ
      img/android-app/fedwiki.png
  30. バイナリ
      img/android-app/friendica.png
  31. バイナリ
      img/android-app/gnusocial.png
  32. バイナリ
      img/android-app/gogs.png
  33. バイナリ
      img/android-app/htmly.png
  34. バイナリ
      img/android-app/hubzilla.png
  35. バイナリ
      img/android-app/irc.png
  36. バイナリ
      img/android-app/kanboard.png
  37. バイナリ
      img/android-app/koel.png
  38. バイナリ
      img/android-app/lychee.png
  39. バイナリ
      img/android-app/mailpile.png
  40. バイナリ
      img/android-app/matrix.png
  41. バイナリ
      img/android-app/mediagoblin.png
  42. バイナリ
      img/android-app/movim.png
  43. バイナリ
      img/android-app/mumble.png
  44. バイナリ
      img/android-app/nextcloud.png
  45. バイナリ
      img/android-app/peertube.png
  46. バイナリ
      img/android-app/pleroma.png
  47. バイナリ
      img/android-app/postactiv.png
  48. バイナリ
      img/android-app/privatebin.png
  49. バイナリ
      img/android-app/rocketchat.png
  50. バイナリ
      img/android-app/searx.png
  51. バイナリ
      img/android-app/syncthing.png
  52. バイナリ
      img/android-app/tahoelafs.png
  53. バイナリ
      img/android-app/turtl.png
  54. バイナリ
      img/android-app/xmpp.png
  55. バイナリ
      img/pubkey.png
  56. バイナリ
      man/freedombone-archive-mail.1.gz
  57. バイナリ
      man/freedombone-client.1.gz
  58. バイナリ
      man/freedombone-image.1.gz
  59. バイナリ
      man/freedombone-template.1.gz
  60. バイナリ
      man/freedombone.1.gz
  61. 1
    0
      src/freedombone-addremove
  62. 6
    2
      src/freedombone-app-akaunting
  63. 6
    0
      src/freedombone-app-batman
  64. 4
    0
      src/freedombone-app-bludit
  65. 4
    0
      src/freedombone-app-dlna
  66. 4
    0
      src/freedombone-app-dokuwiki
  67. 4
    0
      src/freedombone-app-edith
  68. 4
    0
      src/freedombone-app-etherpad
  69. 4
    0
      src/freedombone-app-fedwiki
  70. 4
    0
      src/freedombone-app-friendica
  71. 6
    2
      src/freedombone-app-gnusocial
  72. 72
    58
      src/freedombone-app-gogs
  73. 4
    0
      src/freedombone-app-htmly
  74. 4
    0
      src/freedombone-app-hubzilla
  75. 4
    0
      src/freedombone-app-icecast
  76. 4
    0
      src/freedombone-app-irc
  77. 5
    0
      src/freedombone-app-jitsi
  78. 5
    2
      src/freedombone-app-kanboard
  79. 6
    2
      src/freedombone-app-koel
  80. 4
    0
      src/freedombone-app-lychee
  81. 7
    1
      src/freedombone-app-mailpile
  82. 19
    3
      src/freedombone-app-matrix
  83. 5
    1
      src/freedombone-app-mediagoblin
  84. 6
    2
      src/freedombone-app-movim
  85. 4
    0
      src/freedombone-app-mumble
  86. 25
    8
      src/freedombone-app-nextcloud
  87. 5
    0
      src/freedombone-app-peertube
  88. 2
    2
      src/freedombone-app-pelican
  89. 7
    3
      src/freedombone-app-pleroma
  90. 6
    2
      src/freedombone-app-postactiv
  91. 12
    8
      src/freedombone-app-privatebin
  92. 4
    4
      src/freedombone-app-riot
  93. 343
    0
      src/freedombone-app-rocketchat
  94. 409
    0
      src/freedombone-app-smolrss
  95. 17
    20
      src/freedombone-app-syncthing
  96. 4
    0
      src/freedombone-app-turtl
  97. 7
    4
      src/freedombone-app-xmpp
  98. 45
    0
      src/freedombone-base-email
  99. 14
    27
      src/freedombone-client
  100. 0
    0
      src/freedombone-config

+ 2
- 0
Makefile ファイルの表示

@@ -20,6 +20,7 @@ install:
20 20
 	mkdir -p ${DESTDIR}${PREFIX}/bin
21 21
 	mkdir -p ${DESTDIR}/usr/share/${APP}/base
22 22
 	mkdir -p ${DESTDIR}/usr/share/${APP}/apps
23
+	mkdir -p ${DESTDIR}/usr/share/${APP}/android-app
23 24
 	mkdir -p ${DESTDIR}/usr/share/${APP}/utils
24 25
 	mkdir -p ${DESTDIR}/usr/share/${APP}/avatars
25 26
 	mkdir -p ${DESTDIR}/etc/${APP}
@@ -46,6 +47,7 @@ install:
46 47
 	cp man/*.1.gz ${DESTDIR}${PREFIX}/share/man/man1
47 48
 	cp man/${APP}-backup-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/backup.1.gz
48 49
 	cp man/${APP}-restore-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/restore.1.gz
50
+	cp img/android-app/*.png ${DESTDIR}/usr/share/${APP}/android-app
49 51
 	chown -R root: /usr/share/${APP}
50 52
 	chmod -R +r /usr/share/${APP}
51 53
 #	bash -c "./translate install"

+ 2
- 2
README.md ファイルの表示

@@ -4,11 +4,11 @@ So you want to run your own internet services? Email, chat, VoIP, web sites, fil
4 4
 
5 5
 You can run Freedombone on an old laptop or a single board computer. See the [list of installation methods](https://freedombone.net/installmethods.html). You can also use it to [set up a mesh network](https://freedombone.net/mesh.html) in your local area.
6 6
 
7
-Check out the [list of available apps](https://freedombone.net/apps.html) and [Frequently Asked Questions](https://freedombone.net/faq.html) section. Recent developments are also described on [the blog](https://blog.freedombone.net/tag/freedombone).
7
+Check out the [list of available apps](https://freedombone.net/apps.html) and [Frequently Asked Questions](https://freedombone.net/faq.html) section. Recent developments are also described on [the blog](https://blog.freedombone.net/tag/freedombone). You might also wish to know how to [backup and restore the system](https://freedombone.net/backups.html).
8 8
 
9 9
 Disk images which can be cloned straight to USB or microSD drives are [available here](https://freedombone.net/downloads/v31).
10 10
 
11
-If you find bugs, or want to add a new app to this system see the [Developers Guide](https://freedombone.net/devguide.html) and [Code of Conduct](https://freedombone.net/codeofconduct.html). There is a Matrix chat room available at *#fbone:matrix.freedombone.net*.
11
+If you find bugs, or want to add a new app to this system see the [Developers Guide](https://freedombone.net/devguide.html) and [Code of Conduct](https://freedombone.net/codeofconduct.html). There is a Matrix chat room available at *#fbone:matrix.freedombone.net* and an XMPP channel at *support@chat.freedombone.net*. The XMPP channel requires membership which you can ask for via [these contact details](https://freedombone.net/support.html).
12 12
 
13 13
 If you like this project and want to support continued development then [here's what to do](https://freedombone.net/support.html).
14 14
 

+ 1
- 1
doc/EN/app_bdsmail.org ファイルの表示

@@ -1,7 +1,7 @@
1 1
 #+TITLE:
2 2
 #+AUTHOR: Bob Mottram
3 3
 #+EMAIL: bob@freedombone.net
4
-#+KEYWORDS: freedombone, dlna
4
+#+KEYWORDS: freedombone, bdsmail
5 5
 #+DESCRIPTION: How to use BDS Mail
6 6
 #+OPTIONS: ^:nil toc:nil
7 7
 #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="freedombone.css" />

+ 0
- 2
doc/EN/app_dlna.org ファイルの表示

@@ -23,6 +23,4 @@ Select *Administrator controls* then *App Settings* then *dlna*. From there you
23 23
 
24 24
 The system will scan the /Music/ directory, which could take a while if there are thousands of files, but you don't need to do anything further other than perhaps to log out by selecting *Exit* a couple of times.
25 25
 
26
-If you have an Android device then go to F-Droid (if you don't already have it installed then it can be [[https://f-droid.org/][downloaded here]]) and search for *ControlDLNA*. On running the app you should see a red Debian icon which you can press on, then you may need to select "local". After a few seconds the list of albums or tracks should then appear and you can browse and play them.
27
-
28 26
 The DLNA service will only work within your local home network, and isn't remotely accessible from other locations via the internet. That can be both a good and a bad thing. Another consideration is that there are /no access controls/ on DLNA services, so any music or videos on the USB drive will be playable by anyone within your home network.

+ 28
- 0
doc/EN/app_rocketchat.org ファイルの表示

@@ -0,0 +1,28 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@freedombone.net
4
+#+KEYWORDS: freedombone, rocketchat
5
+#+DESCRIPTION: How to use Rocketchat
6
+#+OPTIONS: ^:nil toc:nil
7
+#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="freedombone.css" />
8
+
9
+#+attr_html: :width 80% :height 10% :align center
10
+[[file:images/logo.png]]
11
+
12
+* Rocketchat
13
+
14
+Rocketchat is a chat system which is mainly suited for private chat with a few family and friends. It has some integration capability with other systems, but isn't federated as [[./app_xmpp.html][XMPP]] or [[./app_matrix.html][Matrix]] are. If you need high security then XMPP with Conversations is probably still the best option.
15
+
16
+This system is only available for X86 architecture, so won't install on ARM boards but probably will on an old laptop.
17
+
18
+* Installation
19
+
20
+ssh into the system with:
21
+
22
+#+BEGIN_SRC bash
23
+ssh myusername@mydomain.com -p 2222
24
+#+END_SRC
25
+
26
+Select *Administrator controls* then *Add/Remove Apps* then *rocketchat*. Enter your domain name and freedns code if you're using freedns.
27
+
28
+Navigate to your rocketchat domain and register an account. The first registration becomes the administrator. It's a good idea within the Rocketchat administration settings under *Accounts* to select *Registration* and *Manually Approve New Users*, then save. This will prevent millions of random internet users from creating accounts on your server.

+ 29
- 0
doc/EN/app_smolrss.org ファイルの表示

@@ -0,0 +1,29 @@
1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@freedombone.net
4
+#+KEYWORDS: freedombone, smolrss, rss
5
+#+DESCRIPTION: How to use Smol RSS
6
+#+OPTIONS: ^:nil toc:nil
7
+#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="freedombone.css" />
8
+
9
+#+attr_html: :width 80% :height 10% :align center
10
+[[file:images/logo.png]]
11
+
12
+* Smol RSS
13
+This is an extremely simple RSS reader which is available only from an onion address, so that you have /the right to read/. There is very little code and so not much attack surface, and it will scale to screens of any size. This should be a better reading experience on mobile than with [[./app_ttrss.html][tt-rss]].
14
+
15
+A disadvantage is that you can only add or remove feeds via the Freedombone administrator control panel, so this isn't suitable for multi-user environments. But once you have your feeds set up it's trivial to use, and unless you publish the onion address confidentiality should be maintained.
16
+
17
+* Installation
18
+
19
+ssh into the system with:
20
+
21
+#+BEGIN_SRC bash
22
+ssh myusername@mydomain.com -p 2222
23
+#+END_SRC
24
+
25
+Select *Administrator controls* then *Add/Remove Apps* then *smolrss*.
26
+
27
+After installation within *Administrator controls* go to *App settings* then *smolrss*. You can then add some feeds or edit the existing feed list. There are a few default feeds as an example.
28
+
29
+Within *Administrator controls* go to *About this system* and select *smolrss*. You will then have the onion address. Navigate to your reader in a Tor compatible browser. You may need to allow the site within NoScript. Then select a feed from the list and begin reading. That's all there is to it.

+ 4
- 1
doc/EN/app_syncthing.org ファイルの表示

@@ -39,7 +39,7 @@ In another terminal log into Freedombone:
39 39
 ssh username@domainname -p 2222
40 40
 #+END_SRC
41 41
 
42
-Then select *File Synchronization*.
42
+Then select *Run an App* and *syncthing*.
43 43
 
44 44
 #+attr_html: :width 80% :align center
45 45
 [[file:images/controlpanel/control_panel_file_sync.jpg]]
@@ -55,6 +55,9 @@ From the top menu select *Actions* and then *Show ID*, then copy the ID string (
55 55
 
56 56
 Now wait for a few minutes. Eventually you will see two messages appear within the browser asking if you want to add two new folders from the Freedombone server. Say yes to both, and specify *~/Sync* as the directory with your username and *~/SyncShared* as the shared directory. You can now copy files into your *~/Sync* directory and they will automatically be synced to the server. Those will be files which only you can access. If you copy files into *~/SyncShared* then they will also be available to any other users on the system.
57 57
 
58
+* Desktop app
59
+If you're running Arch/Parabola there is a package called [[https://github.com/syncthing/syncthing-gtk][syncthing-gtk]] which provides a GTK GUI and an icon indicating whether synchronization is happening. This can be more convenient than using the browser interface.
60
+
58 61
 * On Android
59 62
 Install Syncthing and Connectbot from F-droid.
60 63
 

+ 0
- 3
doc/EN/app_xmpp.org ファイルの表示

@@ -71,9 +71,6 @@ Enter your username (username@domainname) and password.
71 71
 
72 72
 Click on *Advanced* and make sure that *Encryption required* and *Ignore SSL certificate errors* are checked.  Ignoring the certificate errors will allow you to use the self-signed certificate created earlier.  Then click *Done* and set your Jabber account and Empathy to *On*.
73 73
 
74
-* Using Tor Messenger
75
-Tor Messenger is a messaging client which supports XMPP, and its onion routing enables you to protect the metadata of chat interactions to some extent by making it difficult for an adversary to know which server is talking to which. You can download Tor Messenger from [[https://torproject.org][torproject.org]] and the setup is pretty simple.
76
-
77 74
 * Using with Android/Conversations
78 75
 Install [[https://f-droid.org/][F-Droid]]
79 76
 

+ 11
- 3
doc/EN/apps.org ファイルの表示

@@ -155,18 +155,26 @@ A shell based XMPP client which you can run on the Freedombone server via ssh.
155 155
 A browser based user interface for the Matrix federated communications system, including WebRTC audio and video chat.
156 156
 
157 157
 [[./app_riot.html][How to use it]]
158
+* Rocketchat
159
+A non-federated chat server (x86 systems only).
160
+
161
+[[./app_rocketchat.html][How to use it]]
158 162
 * SearX
159 163
 A metasearch engine for customised and private web searches.
160 164
 
161 165
 [[./app_searx.html][How to use it]]
162
-* tt-rss
163
-Private RSS reader. Pulls in RSS/Atom feeds via Tor and is only accessible via an onion address. Have "/the right to read/" without the Surveillance State knowing what you're reading. Also available with a user interface suitable for viewing on mobile devices via a browser such as OrFox.
166
+* Smol RSS
167
+A very minimal RSS reader.
164 168
 
165
-[[./app_rss.html][How to use it]]
169
+[[./app_smolrss.html][How to use it]]
166 170
 * Syncthing
167 171
 Possibly the best way to synchronise files across all of your devices. Once it has been set up it "just works" with no user intervention needed.
168 172
 
169 173
 [[./app_syncthing.html][How to use it]]
174
+* tt-rss
175
+Private RSS reader. Pulls in RSS/Atom feeds via Tor and is only accessible via an onion address. Have "/the right to read/" without the Surveillance State knowing what you're reading. Also available with a user interface suitable for viewing on mobile devices via a browser such as OrFox.
176
+
177
+[[./app_rss.html][How to use it]]
170 178
 * Tahoe-LAFS
171 179
 Robust and encrypted storage of files on one or more server.
172 180
 

+ 1
- 1
doc/EN/armbian.org ファイルの表示

@@ -23,7 +23,7 @@ If you have a single board ARM computer which isn't one of the supported ones th
23 23
 Download the Armbian image for your board. It must be version 9 (Stretch), otherwise it won't work. Extract the image from its archive, then copy it to a microSD card:
24 24
 
25 25
 #+begin_src bash
26
-sudo dd bs=32M if=[Armbian .img file] of=/dev/sdX conv=fdatasync
26
+sudo dd bs=32M if=[Armbian .img file] of=/dev/sdX conv=fdatasync,sync,noerror
27 27
 #+end_src
28 28
 
29 29
 Where */dev/sdX* is the path for the microSD drive on your system.

+ 1
- 0
doc/EN/boards.org ファイルの表示

@@ -20,6 +20,7 @@ The following ARM boards are supported by the build system. If your board isn't
20 20
  - a20-olinuxino-lime
21 21
  - a20-olinuxino-lime2
22 22
  - a20-olinuxino-micro
23
+ - [[http://www.lemaker.org/product-bananapro-index.html][Lemaker Banana Pro]]
23 24
 
24 25
 The latest image builds can be [[./downloads/current][found here]].
25 26
 

+ 2
- 1
doc/EN/devguide.org ファイルの表示

@@ -18,10 +18,11 @@ Suppose you have some internet application which you want to add to the system.
18 18
 
19 19
 There's a command which you can use to generate scripts for new apps. Some examples are as follows:
20 20
 
21
-To create a script for a generic PHP plus MySql/MariaDB web app:
21
+To create a script for a generic PHP plus MySql/MariaDB web app with a couple of extra packages:
22 22
 
23 23
 #+begin_src bash
24 24
 freedombone-template --app [name] -e [email] -r [repo url] \
25
+                     --packages "cowsay libssl-dev" \
25 26
                      -c [commit] --php yes -d mariadb > \
26 27
                      src/freedombone-app-myappname
27 28
 #+end_src

+ 1
- 1
doc/EN/homeserver.org ファイルの表示

@@ -70,7 +70,7 @@ You can now copy the image to the USB thumb drive, replacing *sdX* with the iden
70 70
 
71 71
 #+begin_src bash
72 72
 dd if=/dev/zero of=/dev/sdX bs=32M count=8
73
-dd bs=32M if=myimagefile.img of=/dev/sdX conv=fdatasync
73
+dd bs=32M if=myimagefile.img of=/dev/sdX conv=fdatasync,sync,noerror
74 74
 #+end_src
75 75
 
76 76
 And wait. Again it will take a while to copy over. When that's done plug it into the laptop or netbook which you want to use as a server, power on and set the BIOS to boot from the USB stick.

+ 2
- 2
doc/EN/index.org ファイルの表示

@@ -17,11 +17,11 @@ So you want to run your own internet services? Email, chat, VoIP, web sites, fil
17 17
 
18 18
 You can run Freedombone on an old laptop or a single board computer. See the [[./installmethods.html][list of installation methods]]. You can also use it to [[./mesh.html][set up a mesh network]] in your local area.
19 19
 
20
-Check out the [[./apps.html][list of available apps]] and [[./faq.html][Frequently Asked Questions]] section. Recent developments are also described on [[https://blog.freedombone.net/tag/freedombone][the blog]].
20
+Check out the [[./apps.html][list of available apps]] and [[./faq.html][Frequently Asked Questions]] section. Recent developments are also described on [[https://blog.freedombone.net/tag/freedombone][the blog]]. You might also wish to know how to [[./backups.html][backup and restore the system]].
21 21
 
22 22
 Disk images which can be cloned straight to USB or microSD drives are [[./downloads/v31][available here]].
23 23
 
24
-If you find bugs, or want to add a new app to this system see the [[./devguide.html][Developers Guide]] and [[./codeofconduct.html][Code of Conduct]]. There is a Matrix chat room available at *#fbone:matrix.freedombone.net*.
24
+If you find bugs, or want to add a new app to this system see the [[./devguide.html][Developers Guide]] and [[./codeofconduct.html][Code of Conduct]]. There is a Matrix chat room available at *#fbone:matrix.freedombone.net* and an XMPP channel at *support@chat.freedombone.net*. The XMPP channel requires membership which you can ask for via [[./support.html][these contact details]].
25 25
 
26 26
 If you like this project and want to support continued development then [[./support.html][here's what to do]].
27 27
 

+ 1
- 1
doc/EN/installation.org ファイルの表示

@@ -129,7 +129,7 @@ unxz filename.img.xz
129 129
 Then copy it to a microSD card. Depending on your system you may need an adaptor to be able to do that.
130 130
 
131 131
 #+BEGIN_SRC bash
132
-sudo dd bs=32M if=filename.img of=/dev/sdX conv=fdatasync
132
+sudo dd bs=32M if=filename.img of=/dev/sdX conv=fdatasync,sync,noerror
133 133
 #+END_SRC
134 134
 
135 135
 Where *sdX* is the microSD drive. You can check which drive is the microSD drive using:

+ 4
- 4
doc/EN/mesh_images.org ファイルの表示

@@ -42,7 +42,7 @@ wget https://freedombone.net/downloads/v31/freedombone-meshclient-i386.img.xz.si
42 42
 gpg --verify freedombone-meshclient-i386.img.xz.sig
43 43
 unxz freedombone-meshclient-i386.img.xz
44 44
 sudo dd if=/dev/zero of=/dev/sdX bs=32M count=8
45
-sudo dd bs=32M if=freedombone-meshclient-i386.img of=/dev/sdX conv=fdatasync
45
+sudo dd bs=32M if=freedombone-meshclient-i386.img of=/dev/sdX conv=fdatasync,sync,noerror
46 46
 #+end_src
47 47
 
48 48
 To get a number of systems onto the mesh repeat the /dd/ command to create however many bootable USB drives you need.
@@ -56,7 +56,7 @@ wget https://freedombone.net/downloads/v31/freedombone-meshclient-insecure-i386.
56 56
 gpg --verify freedombone-meshclient-insecure-i386.img.xz.sig
57 57
 unxz freedombone-meshclient-insecure-i386.img.xz
58 58
 sudo dd if=/dev/zero of=/dev/sdX bs=32M count=8
59
-sudo dd bs=32M if=freedombone-meshclient-insecure-i386.img of=/dev/sdX conv=fdatasync
59
+sudo dd bs=32M if=freedombone-meshclient-insecure-i386.img of=/dev/sdX conv=fdatasync,sync,noerror
60 60
 #+end_src
61 61
 
62 62
 ** Router images
@@ -75,7 +75,7 @@ gpg --verify freedombone-mesh_beaglebone-armhf.img.xz.sig
75 75
 sha256sum freedombone-mesh_beaglebone-armhf.img.xz
76 76
 ad8f22c0d46c98a80aa47b5809402971cf5cf26ebf587c59a667307b2386c3d2
77 77
 unxz freedombone-mesh_beaglebone-armhf.img.xz
78
-sudo dd bs=32M if=freedombone-mesh_beaglebone-armhf.img of=/dev/sdX conv=fdatasync
78
+sudo dd bs=32M if=freedombone-mesh_beaglebone-armhf.img of=/dev/sdX conv=fdatasync,sync,noerror
79 79
 #+end_src
80 80
 
81 81
 If you have a few Beaglebone Blacks to use as routers then repeat the /dd/ command to create however many microSD cards you need.
@@ -120,7 +120,7 @@ You can now copy the image to the USB thumb drive, replacing *sdX* with the iden
120 120
 
121 121
 #+begin_src bash
122 122
 sudo dd if=/dev/zero of=/dev/sdX bs=32M count=8
123
-sudo dd bs=32M if=myimagefile.img of=/dev/sdX conv=fdatasync
123
+sudo dd bs=32M if=myimagefile.img of=/dev/sdX conv=fdatasync,sync,noerror
124 124
 #+end_src
125 125
 
126 126
 And wait. Again it will take a while to copy over. When that's done plug it into the laptop or netbook which you want to use on the mesh, power on and set the BIOS to boot from the USB stick.

+ 1
- 1
doc/EN/release3.org ファイルの表示

@@ -31,7 +31,7 @@ Copy the image to a microSD card or USB thumb drive, replacing sdX with the iden
31 31
 
32 32
 #+BEGIN_SRC bash
33 33
 unxz downloadedimagefile.img.xz
34
-dd bs=32M if=downloadedimagefile.img of=/dev/sdX conv=fdatasync
34
+dd bs=32M if=downloadedimagefile.img of=/dev/sdX conv=fdatasync,sync,noerror
35 35
 #+END_SRC
36 36
 
37 37
 And wait. It will take a while to copy over. When that's done you might want to increase the partition size on the drive, using a tool such as [[http://gparted.org][Gparted]]. Whether you need to do that will depend upon how many apps you intend to install and how much data they will store.

+ 1
- 1
doc/EN/release31.org ファイルの表示

@@ -39,7 +39,7 @@ Copy the image to a microSD card or USB thumb drive, replacing sdX with the iden
39 39
 
40 40
 #+BEGIN_SRC bash
41 41
 unxz downloadedimagefile.img.xz
42
-dd bs=32M if=downloadedimagefile.img of=/dev/sdX conv=fdatasync
42
+dd bs=32M if=downloadedimagefile.img of=/dev/sdX conv=fdatasync,sync,noerror
43 43
 #+END_SRC
44 44
 
45 45
 And wait. It will take a while to copy over. When that's done you might want to increase the partition size on the drive, using a tool such as [[http://gparted.org][Gparted]]. Whether you need to do that will depend upon how many apps you intend to install and how much data they will store.

+ 1
- 1
doc/EN/socialinstance.org ファイルの表示

@@ -32,7 +32,7 @@ wget https://freedombone.net/downloads/v31/freedombone-pleroma-amd64.img.xz.sig
32 32
 gpg --verify freedombone-pleroma-amd64.img.xz.sig
33 33
 unxz freedombone-pleroma-amd64.img.xz
34 34
 sudo dd if=/dev/zero of=/dev/sdX bs=32M count=8
35
-sudo dd bs=32M if=freedombone-pleroma-amd64.img of=/dev/sdX conv=fdatasync
35
+sudo dd bs=32M if=freedombone-pleroma-amd64.img of=/dev/sdX conv=fdatasync,sync,noerror
36 36
 #+end_src
37 37
 
38 38
 Also note that if the laptop has a removable SSD drive it's possible to copy the image directly to that if you have enough equipment.

+ 23
- 5
doc/EN/support.org ファイルの表示

@@ -15,11 +15,29 @@
15 15
 
16 16
 This site can also be accessed via a Tor browser at *http://yjxlc3imv7obva4grjae6u3qw527koaytrgjgdp364hmthrst3jodiid.onion*
17 17
 
18
-*Email:* bob@freedombone.net
19
-
20
-*PGP/GPG Fingerprint:* 9ABB82C00ABF39F82680487DCC2536191FA7C33F
21
-
22
-*XMPP:* bob@freedombone.net with OMEMO or OpenPGP
18
+*Email/XMPP:* bob@freedombone.net
19
+
20
+*PGP/GPG Public key:*
21
+#+BEGIN_SRC bash
22
+-----BEGIN PGP PUBLIC KEY BLOCK-----
23
+
24
+mDMEWZBueBYJKwYBBAHaRw8BAQdAKx1t6wL0RTuU6/IBjngMbVJJ3Wg/3UW73/PV
25
+I47xKTS0IUJvYiBNb3R0cmFtIDxib2JAZnJlZWRvbWJvbmUubmV0PoiQBBMWCAA4
26
+FiEEmruCwAq/OfgmgEh9zCU2GR+nwz8FAlmQbngCGwMFCwkIBwMFFQoJCAsFFgID
27
+AQACHgECF4AACgkQzCU2GR+nwz/9sAD/YgsHnVszHNz1zlVc5EgY1ByDupiJpHj0
28
+XsLYk3AbNRgBALn45RqgD4eWHpmOriH09H5Rc5V9iN4+OiGUn2AzJ6oHuDgEWZBu
29
+eBIKKwYBBAGXVQEFAQEHQPRBG2ZQJce475S3e0Dxeb0Fz5WdEu2q3GYLo4QG+4Ry
30
+AwEIB4h4BBgWCAAgFiEEmruCwAq/OfgmgEh9zCU2GR+nwz8FAlmQbngCGwwACgkQ
31
+zCU2GR+nwz+OswD+JOoyBku9FzuWoVoOevU2HH+bPOMDgY2OLnST9ZSyHkMBAMcK
32
+fnaZ2Wi050483Sj2RmQRpb99Dod7rVZTDtCqXk0J
33
+=gv5G
34
+-----END PGP PUBLIC KEY BLOCK-----
35
+#+END_SRC
36
+
37
+#+attr_html: :width 60% :align center
38
+[[file:images/pubkey.png]]
39
+
40
+*XMPP channel:* support@chat.freedombone.net (Requires membership. Ask via XMPP to *bob@freedombone.net*)
23 41
 
24 42
 *Matrix:* #fbone:matrix.freedombone.net
25 43
 

バイナリ
image_build/prosody-0.10-1nightly468.tar.gz ファイルの表示


バイナリ
image_build/prosody-0.10-1nightly478.tar.gz ファイルの表示


バイナリ
img/android-app/akaunting.png ファイルの表示


バイナリ
img/android-app/bludit.png ファイルの表示


バイナリ
img/android-app/dlna.png ファイルの表示


バイナリ
img/android-app/dokuwiki.png ファイルの表示


バイナリ
img/android-app/edith.png ファイルの表示


バイナリ
img/android-app/etherpad.png ファイルの表示


バイナリ
img/android-app/fedwiki.png ファイルの表示


バイナリ
img/android-app/friendica.png ファイルの表示


バイナリ
img/android-app/gnusocial.png ファイルの表示


バイナリ
img/android-app/gogs.png ファイルの表示


バイナリ
img/android-app/htmly.png ファイルの表示


バイナリ
img/android-app/hubzilla.png ファイルの表示


バイナリ
img/android-app/irc.png ファイルの表示


バイナリ
img/android-app/kanboard.png ファイルの表示


バイナリ
img/android-app/koel.png ファイルの表示


バイナリ
img/android-app/lychee.png ファイルの表示


バイナリ
img/android-app/mailpile.png ファイルの表示


バイナリ
img/android-app/matrix.png ファイルの表示


バイナリ
img/android-app/mediagoblin.png ファイルの表示


バイナリ
img/android-app/movim.png ファイルの表示


バイナリ
img/android-app/mumble.png ファイルの表示


バイナリ
img/android-app/nextcloud.png ファイルの表示


バイナリ
img/android-app/peertube.png ファイルの表示


バイナリ
img/android-app/pleroma.png ファイルの表示


バイナリ
img/android-app/postactiv.png ファイルの表示


バイナリ
img/android-app/privatebin.png ファイルの表示


バイナリ
img/android-app/rocketchat.png ファイルの表示


バイナリ
img/android-app/searx.png ファイルの表示


バイナリ
img/android-app/syncthing.png ファイルの表示


バイナリ
img/android-app/tahoelafs.png ファイルの表示


バイナリ
img/android-app/turtl.png ファイルの表示


バイナリ
img/android-app/xmpp.png ファイルの表示


バイナリ
img/pubkey.png ファイルの表示


バイナリ
man/freedombone-archive-mail.1.gz ファイルの表示


バイナリ
man/freedombone-client.1.gz ファイルの表示


バイナリ
man/freedombone-image.1.gz ファイルの表示


バイナリ
man/freedombone-template.1.gz ファイルの表示


バイナリ
man/freedombone.1.gz ファイルの表示


+ 1
- 0
src/freedombone-addremove ファイルの表示

@@ -267,5 +267,6 @@ if [[ "$1" == "add-all" ]]; then
267 267
 else
268 268
     install_apps_selected
269 269
 fi
270
+android_update_apps
270 271
 
271 272
 exit 0

+ 6
- 2
src/freedombone-app-akaunting ファイルの表示

@@ -40,6 +40,10 @@ AKAUNTING_ADMIN_PASSWORD=
40 40
 
41 41
 AKAUNTING_BACKGROUND_IMAGE_URL=
42 42
 
43
+AKAUNTING_SHORT_DESCRIPTION=$'Personal accounting'
44
+AKAUNTING_DESCRIPTION=$'Personal or small business accounting'
45
+AKAUNTING_MOBILE_APP_URL=
46
+
43 47
 akaunting_variables=(ONION_ONLY
44 48
                      AKAUNTING_DOMAIN_NAME
45 49
                      AKAUNTING_CODE
@@ -110,7 +114,7 @@ function install_interactive_akaunting {
110 114
         while [ ! $AKAUNTING_DETAILS_COMPLETE ]
111 115
         do
112 116
             data=$(mktemp 2>/dev/null)
113
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
117
+            if [[ $DDNS_PROVIDER == *"freedns"* ]]; then
114 118
                 dialog --backtitle $"Freedombone Configuration" \
115 119
                        --title $"Akaunting Configuration" \
116 120
                        --form $"\\nPlease enter your Akaunting details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 14 65 2 \
@@ -142,7 +146,7 @@ function install_interactive_akaunting {
142 146
                     AKAUNTING_DOMAIN_NAME=
143 147
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
144 148
                 else
145
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
149
+                    if [[ $DDNS_PROVIDER == *"freedns"* ]]; then
146 150
                         AKAUNTING_CODE=$(sed -n 2p < "$data")
147 151
                         validate_freedns_code "$AKAUNTING_CODE"
148 152
                         if [ ! "$VALID_CODE" ]; then

+ 6
- 0
src/freedombone-app-batman ファイルの表示

@@ -105,6 +105,12 @@ function mesh_install_batman {
105 105
     if ! grep -q "batman_adv" "$rootdir/etc/modules"; then
106 106
         echo 'batman_adv' >> "$rootdir/etc/modules"
107 107
     fi
108
+    if ! grep -q "tunnel6" "$rootdir/etc/modules"; then
109
+        echo 'tunnel6' >> "$rootdir/etc/modules"
110
+    fi
111
+    if ! grep -q "ip6_tunnel" "$rootdir/etc/modules"; then
112
+        echo 'ip6_tunnel' >> "$rootdir/etc/modules"
113
+    fi
108 114
 
109 115
     BATMAN_SCRIPT=$rootdir/var/lib/batman
110 116
 

+ 4
- 0
src/freedombone-app-bludit ファイルの表示

@@ -35,6 +35,10 @@ BLUDIT_ONION_PORT=9844
35 35
 BLUDIT_REPO="https://github.com/bludit/bludit"
36 36
 BLUDIT_COMMIT='0e27e31a84421b3e6bd000a77bc89c2dff3c446a'
37 37
 
38
+BLUDIT_SHORT_DESCRIPTION=$'Markdown blogging'
39
+BLUDIT_DESCRIPTION=$'Simple Markdown blogging'
40
+BLUDIT_MOBILE_APP_URL=
41
+
38 42
 bludit_variables=(ONION_ONLY
39 43
                   BLUDIT_DOMAIN_NAME
40 44
                   BLUDIT_CODE

+ 4
- 0
src/freedombone-app-dlna ファイルの表示

@@ -31,6 +31,10 @@ VARIANTS='full full-vim media'
31 31
 IN_DEFAULT_INSTALL=0
32 32
 SHOW_ON_ABOUT=0
33 33
 
34
+DLNA_SHORT_DESCRIPTION=$'Streaming media'
35
+DLNA_DESCRIPTION=$'Streaming media'
36
+DLNA_MOBILE_APP_URL=
37
+
34 38
 dlna_variables=(SYSTEM_TYPE
35 39
                 USB_MOUNT_DLNA
36 40
                 INSTALLED_WITHIN_DOCKER

+ 4
- 0
src/freedombone-app-dokuwiki ファイルの表示

@@ -40,6 +40,10 @@ DOKUWIKI_TITLE="${PROJECT_NAME} Dokuwiki"
40 40
 DOKUWIKI_REPO="https://github.com/splitbrain/dokuwiki"
41 41
 DOKUWIKI_COMMIT='be15c01c0b982cf1a75b5af031bf077143c63f39'
42 42
 
43
+DOKUWIKI_SHORT_DESCRIPTION=$'Databaseless wiki'
44
+DOKUWIKI_DESCRIPTION=$'Databaseless wiki'
45
+DOKUWIKI_MOBILE_APP_URL=
46
+
43 47
 dokuwiki_variables=(ONION_ONLY
44 48
                     MY_USERNAME
45 49
                     DOKUWIKI_TITLE

+ 4
- 0
src/freedombone-app-edith ファイルの表示

@@ -38,6 +38,10 @@ EDITH_CODE=
38 38
 EDITH_ONION_PORT=8278
39 39
 EDITH_LOGIN_TEXT=$"Edith login"
40 40
 
41
+EDITH_SHORT_DESCRIPTION=$'Simple notes'
42
+EDITH_DESCRIPTION=$'Extremely simple note taking'
43
+EDITH_MOBILE_APP_URL=
44
+
41 45
 edith_variables=(MY_USERNAME
42 46
                  MY_EMAIL_ADDRESS
43 47
                  ONION_ONLY

+ 4
- 0
src/freedombone-app-etherpad ファイルの表示

@@ -42,6 +42,10 @@ ETHERPAD_ADMIN_PASSWORD=
42 42
 ETHERPAD_TITLE=$'Freedombone Docs'
43 43
 ETHERPAD_WELCOME_MESSAGE=$"Welcome to ${ETHERPAD_TITLE}!\\n\\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!"
44 44
 
45
+ETHERPAD_SHORT_DESCRIPTION=$'Collaborative document editor'
46
+ETHERPAD_DESCRIPTION=$'Collaborative document editor'
47
+ETHERPAD_MOBILE_APP_URL=
48
+
45 49
 etherpad_variables=(ONION_ONLY
46 50
                     DEFAULT_DOMAIN_NAME
47 51
                     ETHERPAD_DOMAIN_NAME

+ 4
- 0
src/freedombone-app-fedwiki ファイルの表示

@@ -42,6 +42,10 @@ FEDWIKI_PORT=3053
42 42
 FEDWIKI_DATA=/var/lib/fedwiki
43 43
 FEDWIKI_COOKIE=
44 44
 
45
+FEDWIKI_SHORT_DESCRIPTION=$'Federated wiki'
46
+FEDWIKI_DESCRIPTION=$'Federated wiki'
47
+FEDWIKI_MOBILE_APP_URL=
48
+
45 49
 fedwiki_variables=(FEDWIKI_DOMAIN_NAME
46 50
                    FEDWIKI_CODE
47 51
                    FEDWIKI_COOKIE

+ 4
- 0
src/freedombone-app-friendica ファイルの表示

@@ -40,6 +40,10 @@ FRIENDICA_ADMIN_PASSWORD=
40 40
 FRIENDICA_COMMIT='b5a42c5b31fae5315bacd37769eba20ab2345aaa'
41 41
 FRIENDICA_ADDONS_COMMIT='7cb9dbdda7f227462895c07be3c968405561d40e'
42 42
 
43
+FRIENDICA_SHORT_DESCRIPTION=$'Federated social network'
44
+FRIENDICA_DESCRIPTION=$'Federated social network'
45
+FRIENDICA_MOBILE_APP_URL=
46
+
43 47
 friendica_variables=(ONION_ONLY
44 48
                      FRIENDICA_DOMAIN_NAME
45 49
                      FRIENDICA_CODE

+ 6
- 2
src/freedombone-app-gnusocial ファイルの表示

@@ -46,6 +46,10 @@ GNUSOCIAL_TITLE='Pleroma FE'
46 46
 # Number of months after which posts expire
47 47
 GNUSOCIAL_EXPIRE_MONTHS=3
48 48
 
49
+GNUSOCIAL_SHORT_DESCRIPTION=$'Federated microblogging'
50
+GNUSOCIAL_DESCRIPTION=$'Federated microblogging'
51
+GNUSOCIAL_MOBILE_APP_URL='https://f-droid.org/packages/org.mariotaku.twidere/'
52
+
49 53
 gnusocial_variables=(ONION_ONLY
50 54
                      GNUSOCIAL_DOMAIN_NAME
51 55
                      GNUSOCIAL_CODE
@@ -112,7 +116,7 @@ function install_interactive_gnusocial {
112 116
         while [ ! $GNUSOCIAL_DETAILS_COMPLETE ]
113 117
         do
114 118
             data=$(mktemp 2>/dev/null)
115
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
119
+            if [[ $DDNS_PROVIDER == *"freedns"* ]]; then
116 120
                 dialog --backtitle $"Freedombone Configuration" \
117 121
                        --title $"GNU Social Configuration" \
118 122
                        --form $"\\nPlease enter your GNU Social details. The background image URL can be left blank.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 16 65 4 \
@@ -156,7 +160,7 @@ function install_interactive_gnusocial {
156 160
                     GNUSOCIAL_DOMAIN_NAME=
157 161
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
158 162
                 else
159
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
163
+                    if [[ $DDNS_PROVIDER == *"freedns"* ]]; then
160 164
                         GNUSOCIAL_CODE=$(sed -n 4p < "$data")
161 165
                         validate_freedns_code "$GNUSOCIAL_CODE"
162 166
                         if [ ! "$VALID_CODE" ]; then

+ 72
- 58
src/freedombone-app-gogs ファイルの表示

@@ -34,17 +34,21 @@ SHOW_ON_ABOUT=1
34 34
 GOGS_USERNAME='gogs'
35 35
 GOGS_VERSION='0.11.29'
36 36
 
37
-GIT_DOMAIN_NAME=
38
-GIT_CODE=
37
+GOGS_DOMAIN_NAME=
38
+GOGS_CODE=
39 39
 GIT_ONION_PORT=8090
40 40
 GIT_ADMIN_PASSWORD=
41 41
 GOGS_BIN=
42
+GOGS_PORT=3145
43
+
44
+GOGS_SHORT_DESCRIPTION=$'Git repo management'
45
+GOGS_DESCRIPTION=$'Git repo management'
46
+GOGS_MOBILE_APP_URL=
42 47
 
43 48
 gogs_variables=(ONION_ONLY
44 49
                 GIT_ADMIN_PASSWORD
45
-                GIT_DOMAIN_NAME
46
-                GIT_CODE
47
-                GIT_ONION_PORT
50
+                GOGS_DOMAIN_NAME
51
+                GOGS_CODE
48 52
                 MY_USERNAME
49 53
                 DDNS_PROVIDER
50 54
                 ARCHITECTURE)
@@ -64,8 +68,8 @@ function change_password_gogs {
64 68
 
65 69
 function install_interactive_gogs {
66 70
     if [[ $ONION_ONLY != "no" ]]; then
67
-        GIT_DOMAIN_NAME='gogs.local'
68
-        write_config_param "GIT_DOMAIN_NAME" "$GIT_DOMAIN_NAME"
71
+        GOGS_DOMAIN_NAME='gogs.local'
72
+        write_config_param "GOGS_DOMAIN_NAME" "$GOGS_DOMAIN_NAME"
69 73
     else
70 74
         function_check interactive_site_details
71 75
         interactive_site_details git
@@ -149,6 +153,18 @@ function upgrade_gogs {
149 153
         return
150 154
     fi
151 155
 
156
+    GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
157
+    GOGS_CONFIG_FILE=$GOGS_CONFIG_PATH/app.ini
158
+
159
+    # Change port number if necessary
160
+    if ! grep -q "HTTP_PORT = ${GOGS_PORT}" "${GOGS_CONFIG_FILE}"; then
161
+        sed -i "s|HTTP_PORT =.*|HTTP_PORT = ${GOGS_PORT}|g" "${GOGS_CONFIG_FILE}"
162
+        read_config_param GOGS_DOMAIN_NAME
163
+        sed -i "s|proxy_pass .*|proxy_pass http://localhost:${GOGS_PORT};|g" "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
164
+        systemctl restart gogs
165
+        systemctl restart nginx
166
+    fi
167
+
152 168
     CURR_GOGS_VERSION=$(get_completion_param "gogs version")
153 169
     echo "gogs current version: ${CURR_GOGS_VERSION}"
154 170
     echo "gogs app version: ${GOGS_VERSION}"
@@ -156,8 +172,6 @@ function upgrade_gogs {
156 172
         return
157 173
     fi
158 174
 
159
-    GOGS_CONFIG_PATH=/home/${GOGS_USERNAME}/custom/conf
160
-    GOGS_CONFIG_FILE=$GOGS_CONFIG_PATH/app.ini
161 175
     cp "$GOGS_CONFIG_FILE $INSTALL_DIR/gogs_config.ini"
162 176
 
163 177
     if [ -d "$INSTALL_DIR/gogs-repositories" ]; then
@@ -257,7 +271,7 @@ function restore_local_gogs {
257 271
         return
258 272
     fi
259 273
 
260
-    if [ ${#GIT_DOMAIN_NAME} -gt 2 ]; then
274
+    if [ ${#GOGS_DOMAIN_NAME} -gt 2 ]; then
261 275
         function_check gogs_create_database
262 276
         gogs_create_database
263 277
 
@@ -265,7 +279,7 @@ function restore_local_gogs {
265 279
         GOGS_CONFIG_FILE="${GOGS_CONFIG_PATH}/app.ini"
266 280
 
267 281
         function_check restore_database
268
-        restore_database gogs "${GIT_DOMAIN_NAME}"
282
+        restore_database gogs "${GOGS_DOMAIN_NAME}"
269 283
         temp_restore_dir=/root/tempgogs
270 284
         if [ -d "${USB_MOUNT}/backup/gogs" ]; then
271 285
             echo $"Restoring Gogs settings"
@@ -339,7 +353,7 @@ function restore_local_gogs {
339 353
 function backup_remote_gogs {
340 354
     if [ -d /home/$GOGS_USERNAME ]; then
341 355
         function_check suspend_site
342
-        suspend_site ${GIT_DOMAIN_NAME}
356
+        suspend_site ${GOGS_DOMAIN_NAME}
343 357
 
344 358
         function_check backup_database_to_friend
345 359
         backup_database_to_friend gogs
@@ -368,7 +382,7 @@ function backup_remote_gogs {
368 382
 
369 383
 function restore_remote_gogs {
370 384
     if grep -q "gogs domain" "$COMPLETION_FILE"; then
371
-        GIT_DOMAIN_NAME=$(get_completion_param "gogs domain")
385
+        GOGS_DOMAIN_NAME=$(get_completion_param "gogs domain")
372 386
 
373 387
         function_check gogs_create_database
374 388
         gogs_create_database
@@ -377,7 +391,7 @@ function restore_remote_gogs {
377 391
         GOGS_CONFIG_FILE=${GOGS_CONFIG_PATH}/app.ini
378 392
 
379 393
         function_check restore_database_from_friend
380
-        restore_database_from_friend gogs "${GIT_DOMAIN_NAME}"
394
+        restore_database_from_friend gogs "${GOGS_DOMAIN_NAME}"
381 395
         if [ -d "${SERVER_DIRECTORY}/backup/gogs" ]; then
382 396
             if [ ! -d $GOGS_CONFIG_PATH ]; then
383 397
                 mkdir -p $GOGS_CONFIG_PATH
@@ -434,19 +448,19 @@ function restore_remote_gogs {
434 448
 }
435 449
 
436 450
 function remove_gogs {
437
-    if [ ${#GIT_DOMAIN_NAME} -eq 0 ]; then
451
+    if [ ${#GOGS_DOMAIN_NAME} -eq 0 ]; then
438 452
         return
439 453
     fi
440 454
     systemctl stop gogs
441 455
     systemctl disable gogs
442 456
 
443
-    nginx_dissite "${GIT_DOMAIN_NAME}"
444
-    remove_certs "${GIT_DOMAIN_NAME}"
445
-    if [ -d "/var/www/${GIT_DOMAIN_NAME}" ]; then
446
-        rm -rf "/var/www/${GIT_DOMAIN_NAME}"
457
+    nginx_dissite "${GOGS_DOMAIN_NAME}"
458
+    remove_certs "${GOGS_DOMAIN_NAME}"
459
+    if [ -d "/var/www/${GOGS_DOMAIN_NAME}" ]; then
460
+        rm -rf "/var/www/${GOGS_DOMAIN_NAME}"
447 461
     fi
448
-    if [ -f "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}" ]; then
449
-        rm "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
462
+    if [ -f "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}" ]; then
463
+        rm "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
450 464
     fi
451 465
     function_check drop_database
452 466
     drop_database gogs
@@ -462,11 +476,11 @@ function remove_gogs {
462 476
     userdel -r gogs
463 477
 
464 478
     function_check remove_ddns_domain
465
-    remove_ddns_domain "$GIT_DOMAIN_NAME"
479
+    remove_ddns_domain "$GOGS_DOMAIN_NAME"
466 480
 }
467 481
 
468 482
 function install_gogs {
469
-    if [ ! "$GIT_DOMAIN_NAME" ]; then
483
+    if [ ! "$GOGS_DOMAIN_NAME" ]; then
470 484
         return
471 485
     fi
472 486
 
@@ -569,34 +583,34 @@ function install_gogs {
569 583
     systemctl daemon-reload
570 584
     systemctl start gogs
571 585
 
572
-    if [ ! -d "/var/www/${GIT_DOMAIN_NAME}" ]; then
573
-        mkdir "/var/www/${GIT_DOMAIN_NAME}"
586
+    if [ ! -d "/var/www/${GOGS_DOMAIN_NAME}" ]; then
587
+        mkdir "/var/www/${GOGS_DOMAIN_NAME}"
574 588
     fi
575
-    if [ -d "/var/www/${GIT_DOMAIN_NAME}/htdocs" ]; then
576
-        rm -rf "/var/www/${GIT_DOMAIN_NAME}/htdocs"
589
+    if [ -d "/var/www/${GOGS_DOMAIN_NAME}/htdocs" ]; then
590
+        rm -rf "/var/www/${GOGS_DOMAIN_NAME}/htdocs"
577 591
     fi
578 592
 
579 593
     if [[ "${ONION_ONLY}" == "no" ]]; then
580 594
         function_check nginx_http_redirect
581
-        nginx_http_redirect "${GIT_DOMAIN_NAME}"
595
+        nginx_http_redirect "${GOGS_DOMAIN_NAME}"
582 596
         { echo 'server {';
583 597
           echo '    listen 443 ssl;';
584 598
           echo '    #listen [::]:443 ssl;';
585
-          echo "    root /var/www/${GIT_DOMAIN_NAME}/htdocs;";
586
-          echo "    server_name ${GIT_DOMAIN_NAME};";
599
+          echo "    root /var/www/${GOGS_DOMAIN_NAME}/htdocs;";
600
+          echo "    server_name ${GOGS_DOMAIN_NAME};";
587 601
           echo '    access_log /dev/null;';
588 602
           echo "    error_log /dev/null;";
589
-          echo ''; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
603
+          echo ''; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
590 604
         function_check nginx_ssl
591
-        nginx_ssl "${GIT_DOMAIN_NAME}"
605
+        nginx_ssl "${GOGS_DOMAIN_NAME}"
592 606
         function_check nginx_security_options
593
-        nginx_security_options "${GIT_DOMAIN_NAME}"
607
+        nginx_security_options "${GOGS_DOMAIN_NAME}"
594 608
         { echo '    add_header Strict-Transport-Security max-age=0;';
595 609
           echo '';
596
-          echo '    location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
610
+          echo '    location / {'; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
597 611
         function_check nginx_limits
598
-        nginx_limits "${GIT_DOMAIN_NAME}" '10G'
599
-        { echo '        proxy_pass http://localhost:3000;';
612
+        nginx_limits "${GOGS_DOMAIN_NAME}" '10G'
613
+        { echo "        proxy_pass http://localhost:${GOGS_PORT};";
600 614
           echo '    }';
601 615
           echo '';
602 616
           echo '    fastcgi_buffers 64 4K;';
@@ -610,25 +624,25 @@ function install_gogs {
610 624
           echo '        access_log /dev/null;';
611 625
           echo '    }';
612 626
           echo '}';
613
-          echo ''; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
627
+          echo ''; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
614 628
     else
615
-        echo -n '' > "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
629
+        echo -n '' > "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
616 630
     fi
617 631
     { echo 'server {';
618 632
       echo "    listen 127.0.0.1:${GIT_ONION_PORT} default_server;";
619
-      echo "    root /var/www/$GIT_DOMAIN_NAME/htdocs;";
620
-      echo "    server_name $GIT_DOMAIN_NAME;";
633
+      echo "    root /var/www/$GOGS_DOMAIN_NAME/htdocs;";
634
+      echo "    server_name $GOGS_DOMAIN_NAME;";
621 635
       echo '    access_log /dev/null;';
622 636
       echo "    error_log /dev/null;";
623
-      echo ''; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
637
+      echo ''; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
624 638
     function_check nginx_security_options
625
-    nginx_security_options "${GIT_DOMAIN_NAME}"
639
+    nginx_security_options "${GOGS_DOMAIN_NAME}"
626 640
     { echo '    add_header Strict-Transport-Security max-age=0;';
627 641
       echo '';
628
-      echo '    location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
642
+      echo '    location / {'; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
629 643
     function_check nginx_limits
630
-    nginx_limits "${GIT_DOMAIN_NAME}" '10G'
631
-    { echo '        proxy_pass http://localhost:3000;';
644
+    nginx_limits "${GOGS_DOMAIN_NAME}" '10G'
645
+    { echo "        proxy_pass http://localhost:${GOGS_PORT};";
632 646
       echo '    }';
633 647
       echo '';
634 648
       echo '    fastcgi_buffers 64 4K;';
@@ -641,15 +655,15 @@ function install_gogs {
641 655
       echo '        log_not_found off;';
642 656
       echo '        access_log /dev/null;';
643 657
       echo '    }';
644
-      echo '}'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
658
+      echo '}'; } >> "/etc/nginx/sites-available/${GOGS_DOMAIN_NAME}"
645 659
 
646 660
     function_check configure_php
647 661
     configure_php
648 662
 
649 663
     function_check create_site_certificate
650
-    create_site_certificate "${GIT_DOMAIN_NAME}" 'yes'
664
+    create_site_certificate "${GOGS_DOMAIN_NAME}" 'yes'
651 665
 
652
-    nginx_ensite "${GIT_DOMAIN_NAME}"
666
+    nginx_ensite "${GOGS_DOMAIN_NAME}"
653 667
 
654 668
     if [ ! -d /var/lib/tor ]; then
655 669
         echo $'No Tor installation found. Gogs onion site cannot be configured.'
@@ -674,11 +688,11 @@ function install_gogs {
674 688
     systemctl restart php7.0-fpm
675 689
     systemctl restart nginx
676 690
 
677
-    set_completion_param "gogs domain" "$GIT_DOMAIN_NAME"
691
+    set_completion_param "gogs domain" "$GOGS_DOMAIN_NAME"
678 692
     set_completion_param "gogs onion domain" "$GIT_ONION_HOSTNAME"
679 693
 
680 694
     function_check add_ddns_domain
681
-    add_ddns_domain "${GIT_DOMAIN_NAME}"
695
+    add_ddns_domain "${GOGS_DOMAIN_NAME}"
682 696
 
683 697
     # obtain the secret key
684 698
     GOGS_SECRET_KEY="$(create_password "${MINIMUM_PASSWORD_LENGTH}")"
@@ -707,17 +721,17 @@ function install_gogs {
707 721
       echo '';
708 722
       echo '[server]'; } >> ${GOGS_CONFIG_FILE}
709 723
     if [[ ${ONION_ONLY} == 'no' ]]; then
710
-        echo "DOMAIN = ${GIT_DOMAIN_NAME}" >> ${GOGS_CONFIG_FILE}
711
-        echo "ROOT_URL = https://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
724
+        echo "DOMAIN = ${GOGS_DOMAIN_NAME}" >> ${GOGS_CONFIG_FILE}
725
+        echo "ROOT_URL = https://$GOGS_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
712 726
     else
713 727
         echo "DOMAIN = ${GIT_ONION_HOSTNAME}" >> ${GOGS_CONFIG_FILE}
714
-        echo "ROOT_URL = http://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
728
+        echo "ROOT_URL = http://$GOGS_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
715 729
     fi
716
-    { echo 'HTTP_PORT = 3000';
730
+    { echo "HTTP_PORT = ${GOGS_PORT}";
717 731
       echo "SSH_PORT = $SSH_PORT";
718 732
       echo 'SSH_DOMAIN = %(DOMAIN)s';
719
-      echo "CERT_FILE = /etc/ssl/certs/${GIT_DOMAIN_NAME}.pem";
720
-      echo "KEY_FILE = /etc/ssl/private/${GIT_DOMAIN_NAME}.key";
733
+      echo "CERT_FILE = /etc/ssl/certs/${GOGS_DOMAIN_NAME}.pem";
734
+      echo "KEY_FILE = /etc/ssl/private/${GOGS_DOMAIN_NAME}.key";
721 735
       echo 'DISABLE_ROUTER_LOG = true';
722 736
       echo '';
723 737
       echo '[session]';
@@ -747,9 +761,9 @@ function install_gogs {
747 761
     systemctl restart gogs
748 762
 
749 763
     if ! grep -q "gogs domain:" "${COMPLETION_FILE}"; then
750
-        echo "gogs domain:${GIT_DOMAIN_NAME}" >> "${COMPLETION_FILE}"
764
+        echo "gogs domain:${GOGS_DOMAIN_NAME}" >> "${COMPLETION_FILE}"
751 765
     else
752
-        sed -i "s|gogs domain.*|gogs domain:${GIT_DOMAIN_NAME}|g" "${COMPLETION_FILE}"
766
+        sed -i "s|gogs domain.*|gogs domain:${GOGS_DOMAIN_NAME}|g" "${COMPLETION_FILE}"
753 767
     fi
754 768
 
755 769
     function_check configure_firewall_for_git

+ 4
- 0
src/freedombone-app-htmly ファイルの表示

@@ -39,6 +39,10 @@ HTMLY_COMMIT='bf5fe9486160be4da86d8987d3e5c977e1dc6d32'
39 39
 HTMLY_TITLE="My Blog"
40 40
 HTMLY_SUBTITLE="Another ${PROJECT_NAME} blog"
41 41
 
42
+HTMLY_SHORT_DESCRIPTION=$'Databaseless blogging'
43
+HTMLY_DESCRIPTION=$'Databaseless blogging'
44
+HTMLY_MOBILE_APP_URL=
45
+
42 46
 htmly_variables=(HTMLY_REPO
43 47
                  HTMLY_DOMAIN_NAME
44 48
                  HTMLY_CODE

+ 4
- 0
src/freedombone-app-hubzilla ファイルの表示

@@ -41,6 +41,10 @@ HUBZILLA_ADDONS_REPO="https://github.com/redmatrix/hubzilla-addons.git"
41 41
 HUBZILLA_ADDONS_COMMIT='be9dcd044b9326c3bd9301d7c4b375a2c2f54663'
42 42
 HUBZILLA_ADMIN_PASSWORD=
43 43
 
44
+HUBZILLA_SHORT_DESCRIPTION=$'Web publishing system'
45
+HUBZILLA_DESCRIPTION=$'Web publishing system'
46
+HUBZILLA_MOBILE_APP_URL=
47
+
44 48
 hubzilla_variables=(ONION_ONLY
45 49
                     HUBZILLA_DOMAIN_NAME
46 50
                     HUBZILLA_CODE

+ 4
- 0
src/freedombone-app-icecast ファイルの表示

@@ -44,6 +44,10 @@ ICECAST_DIR=/icestream
44 44
 ICECAST_PLAYLIST_FILE=/etc/ices2/playlist.txt
45 45
 ICECAST_LOGIN_TEXT=$"Icecast login"
46 46
 
47
+ICECAST_SHORT_DESCRIPTION=$'Media broadcast'
48
+ICECAST_DESCRIPTION=$'Media broadcast'
49
+ICECAST_MOBILE_APP_URL=
50
+
47 51
 icecast_variables=(MY_USERNAME
48 52
                    MY_EMAIL_ADDRESS
49 53
                    ONION_ONLY

+ 4
- 0
src/freedombone-app-irc ファイルの表示

@@ -41,6 +41,10 @@ IRC_PASSWORD=
41 41
 # Number of entries for the bouncer to buffer
42 42
 IRC_BUFFER_LENGTH=300
43 43
 
44
+IRC_SHORT_DESCRIPTION=$'Classic chat system'
45
+IRC_DESCRIPTION=$'Classic chat system'
46
+IRC_MOBILE_APP_URL='https://f-droid.org/packages/org.yaaic'
47
+
44 48
 irc_variables=(MY_USERNAME
45 49
                MY_NAME
46 50
                IRC_PORT

+ 5
- 0
src/freedombone-app-jitsi ファイルの表示

@@ -33,6 +33,7 @@ VARIANTS=""
33 33
 IN_DEFAULT_INSTALL=0
34 34
 SHOW_ON_ABOUT=0
35 35
 NOT_ON_ONION=1
36
+NOT_ON_ARM=1
36 37
 
37 38
 VIDEOBRIDGE_PORT=5347
38 39
 JITSI_ONION_PORT=8102
@@ -43,6 +44,10 @@ JITSI_DOMAIN_NAME=
43 44
 JITSI_CODE=
44 45
 JITSI_ONION_HOSTNAME=
45 46
 
47
+JITSI_SHORT_DESCRIPTION=$'Video conferencing'
48
+JITSI_DESCRIPTION=$'Video conferencing'
49
+JITSI_MOBILE_APP_URL=
50
+
46 51
 jitsi_variables=(ONION_ONLY
47 52
                  JITSI_DOMAIN_NAME
48 53
                  JITSI_ONION_HOSTNAME

+ 5
- 2
src/freedombone-app-kanboard ファイルの表示

@@ -38,6 +38,9 @@ KANBOARD_REPO="https://github.com/kanboard/kanboard"
38 38
 KANBOARD_COMMIT='7a6b1bc3da0af442e02b5a2dc430a4ded8e7c4ee'
39 39
 KANBOARD_ADMIN_PASSWORD=
40 40
 
41
+KANBOARD_SHORT_DESCRIPTION=$'Simple kanban'
42
+KANBOARD_DESCRIPTION=$'Simple kanban'
43
+KANBOARD_MOBILE_APP_URL=
41 44
 
42 45
 kanboard_variables=(ONION_ONLY
43 46
                     KANBOARD_DOMAIN_NAME
@@ -91,7 +94,7 @@ function install_interactive_kanboard {
91 94
         while [ ! $KANBOARD_DETAILS_COMPLETE ]
92 95
         do
93 96
             data=$(mktemp 2>/dev/null)
94
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
97
+            if [[ $DDNS_PROVIDER == *"freedns"* ]]; then
95 98
                 dialog --backtitle $"Freedombone Configuration" \
96 99
                        --title $"KanBoard Configuration" \
97 100
                        --form $"\\nPlease enter your KanBoard details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt." 13 55 2 \
@@ -123,7 +126,7 @@ function install_interactive_kanboard {
123 126
                     KANBOARD_DOMAIN_NAME=
124 127
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
125 128
                 else
126
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
129
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
127 130
                         KANBOARD_CODE=$(sed -n 2p < "$data")
128 131
                         validate_freedns_code "$KANBOARD_CODE"
129 132
                         if [ ! "$VALID_CODE" ]; then

+ 6
- 2
src/freedombone-app-koel ファイルの表示

@@ -40,6 +40,10 @@ KOEL_REPO="https://github.com/phanan/koel"
40 40
 KOEL_COMMIT='8e9b021aa09f2b1460977bdd52fff14ea2bc1607'
41 41
 KOEL_ADMIN_PASSWORD=
42 42
 
43
+KOEL_SHORT_DESCRIPTION=$'Music player'
44
+KOEL_DESCRIPTION=$'Music player'
45
+KOEL_MOBILE_APP_URL=
46
+
43 47
 koel_variables=(ONION_ONLY
44 48
                 KOEL_DOMAIN_NAME
45 49
                 KOEL_CODE
@@ -90,7 +94,7 @@ function install_interactive_koel {
90 94
         while [ ! $KOEL_DETAILS_COMPLETE ]
91 95
         do
92 96
             data=$(mktemp 2>/dev/null)
93
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
97
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
94 98
                 dialog --backtitle $"Freedombone Configuration" \
95 99
                        --title $"Koel Configuration" \
96 100
                        --form $"\\nPlease enter your Koel details. The background image URL can be left blank.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 16 65 3 \
@@ -122,7 +126,7 @@ function install_interactive_koel {
122 126
                     KOEL_DOMAIN_NAME=
123 127
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
124 128
                 else
125
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
129
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
126 130
                         KOEL_CODE=$(sed -n 2p < "$data")
127 131
                         validate_freedns_code "$KOEL_CODE"
128 132
                         if [ ! "$VALID_CODE" ]; then

+ 4
- 0
src/freedombone-app-lychee ファイルの表示

@@ -37,6 +37,10 @@ LYCHEE_ONION_PORT=8105
37 37
 LYCHEE_REPO="https://github.com/electerious/Lychee"
38 38
 LYCHEE_COMMIT='27f207dcbac8488629ffc3b5a9cac78ae123bee9'
39 39
 
40
+LYCHEE_SHORT_DESCRIPTION=$'Photo album'
41
+LYCHEE_DESCRIPTION=$'Photo album'
42
+LYCHEE_MOBILE_APP_URL=
43
+
40 44
 lychee_variables=(LYCHEE_REPO
41 45
                   LYCHEE_DOMAIN_NAME
42 46
                   LYCHEE_CODE

+ 7
- 1
src/freedombone-app-mailpile ファイルの表示

@@ -35,9 +35,13 @@ MAILPILE_DOMAIN_NAME=
35 35
 MAILPILE_CODE=
36 36
 MAILPILE_ONION_PORT=8103
37 37
 MAILPILE_REPO="https://github.com/mailpile/Mailpile"
38
-MAILPILE_COMMIT='f82074d2ab5ccd65d14a6b3c6cd65aeb132831d7'
38
+MAILPILE_COMMIT='4f28f1bb55b3b9985f22ab6372d539b1087482dd'
39 39
 MAILPILE_PORT=33411
40 40
 
41
+MAILPILE_SHORT_DESCRIPTION=$'Email system'
42
+MAILPILE_DESCRIPTION=$'Email system'
43
+MAILPILE_MOBILE_APP_URL=
44
+
41 45
 mailpile_variables=(MAILPILE_REPO
42 46
                     MAILPILE_DOMAIN_NAME
43 47
                     MAILPILE_CODE
@@ -105,6 +109,7 @@ function upgrade_mailpile {
105 109
     pip install -r requirements.txt
106 110
 
107 111
     chown -R mailpile:mailpile "/var/www/$MAILPILE_DOMAIN_NAME/mail"
112
+    systemctl restart mailpile
108 113
 }
109 114
 
110 115
 function backup_local_mailpile {
@@ -171,6 +176,7 @@ function install_mailpile {
171 176
     fi
172 177
 
173 178
     apt-get -yq install python-pip python-lxml python-dev libjpeg-dev
179
+    apt-get -yq install openssl python-pgpdump python-cryptography libssl-dev
174 180
 
175 181
     if [ ! -d /var/www/$MAILPILE_DOMAIN_NAME ]; then
176 182
         mkdir /var/www/$MAILPILE_DOMAIN_NAME

+ 19
- 3
src/freedombone-app-matrix ファイルの表示

@@ -48,11 +48,15 @@ MATRIX_PORT=8009
48 48
 MATRIX_FEDERATION_ONION_PORT=8111
49 49
 MATRIX_ONION_PORT=8109
50 50
 MATRIX_REPO="https://github.com/matrix-org/synapse"
51
-MATRIX_COMMIT='ddb00efc1ddec646d02e8def6053003f04d077d7'
51
+MATRIX_COMMIT='9e8ab0a4f44a3ec9e4b049f5571c14e333e8f0fa'
52 52
 REPORT_STATS="no"
53 53
 MATRIX_SECRET=
54 54
 MATRIX_EXPIRE_MONTHS=1
55 55
 
56
+MATRIX_SHORT_DESCRIPTION=$'Chat system'
57
+MATRIX_DESCRIPTION=$'Chat system'
58
+MATRIX_MOBILE_APP_URL='https://f-droid.org/packages/im.vector.alpha'
59
+
56 60
 matrix_variables=(ONION_ONLY
57 61
                   MY_USERNAME
58 62
                   MATRIX_SECRET
@@ -418,6 +422,11 @@ function upgrade_matrix {
418 422
     function_check set_repo_commit
419 423
     set_repo_commit /etc/matrix "matrix commit" "$MATRIX_COMMIT" $MATRIX_REPO
420 424
     cd /etc/matrix || exit 62476724
425
+    if [ ! -d /etc/matrix/tmp ]; then
426
+        mkdir /etc/matrix/tmp
427
+    fi
428
+    export TMPDIR=/etc/matrix/tmp
429
+
421 430
     pip install --upgrade --process-dependency-links .
422 431
     pip install --upgrade --force "pynacl>=1.2.1"
423 432
 
@@ -426,7 +435,8 @@ function upgrade_matrix {
426 435
     chown -R matrix:matrix /etc/matrix
427 436
     chown -R matrix:matrix $MATRIX_DATA_DIR
428 437
 
429
-    pip install --upgrade --force "pynacl==0.3.0"
438
+    pip install --upgrade --force "pynacl>=1.2.1"
439
+    pip install --upgrade --force "canonicaljson>=1.1.3"
430 440
     pip install --upgrade --force "phonenumbers>=8.2.0"
431 441
 
432 442
     if [ -f /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam ]; then
@@ -434,6 +444,11 @@ function upgrade_matrix {
434 444
     fi
435 445
     systemctl start turn
436 446
     systemctl start matrix
447
+
448
+    export TMPDIR=/tmp
449
+    if [ -d /etc/matrix/tmp ]; then
450
+        rm -rf /etc/matrix/tmp/*
451
+    fi
437 452
 }
438 453
 
439 454
 function backup_local_matrix {
@@ -794,7 +809,8 @@ function install_matrix {
794 809
     # wait for nginx to start otherwise user add fails later
795 810
     sleep 5
796 811
 
797
-    pip install --upgrade --force "pynacl==0.3.0"
812
+    pip install --upgrade --force "pynacl>=1.2.1"
813
+    pip install --upgrade --force "canonicaljson>=1.1.3"
798 814
 
799 815
     if [[ $(add_user_matrix "${MY_USERNAME}" "${MATRIX_PASSWORD}" | tail -n 1) != "0" ]]; then
800 816
         echo $'Failed to add matrix admin user';

+ 5
- 1
src/freedombone-app-mediagoblin ファイルの表示

@@ -35,11 +35,15 @@ MEDIAGOBLIN_DOMAIN_NAME=
35 35
 MEDIAGOBLIN_ADMIN_PASSWORD=
36 36
 MEDIAGOBLIN_CODE=
37 37
 MEDIAGOBLIN_ONION_PORT=8108
38
-MEDIAGOBLIN_REPO="http://git.savannah.gnu.org/r/mediagoblin.git"
38
+MEDIAGOBLIN_REPO="https://git.savannah.gnu.org/git/mediagoblin.git"
39 39
 MEDIAGOBLIN_COMMIT='c4d3293dfa4076719e60fe9e052add07426f9a9a'
40 40
 MEDIAGOBLIN_BASE_DIR=/var/www/mediagoblin.local/htdocs
41 41
 MEDIAGOBLIN_PORT=6543
42 42
 
43
+MEDIAGOBLIN_SHORT_DESCRIPTION=$'Media storage and broadcast'
44
+MEDIAGOBLIN_DESCRIPTION=$'Media storage and broadcast'
45
+MEDIAGOBLIN_MOBILE_APP_URL=
46
+
43 47
 mediagoblin_variables=(ONION_ONLY
44 48
                        MY_USERNAME
45 49
                        MEDIAGOBLIN_DOMAIN_NAME

+ 6
- 2
src/freedombone-app-movim ファイルの表示

@@ -39,6 +39,10 @@ MOVIM_COMMIT='6142c2033b7695448516a67690324a3bde048260'
39 39
 MOVIM_ADMIN_PASSWORD=
40 40
 MOVIM_DAEMON_PORT=8880
41 41
 
42
+MOVIM_SHORT_DESCRIPTION=$'xmpp based chat system'
43
+MOVIM_DESCRIPTION=$'xmpp based chat system'
44
+MOVIM_MOBILE_APP_URL='https://f-droid.org/packages/com.movim.movim'
45
+
42 46
 movim_variables=(ONION_ONLY
43 47
                  MOVIM_DOMAIN_NAME
44 48
                  MOVIM_CODE
@@ -79,7 +83,7 @@ function install_interactive_movim {
79 83
         while [ ! $MOVIM_DETAILS_COMPLETE ]
80 84
         do
81 85
             data=$(mktemp 2>/dev/null)
82
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
86
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
83 87
                 dialog --backtitle $"Freedombone Configuration" \
84 88
                        --title $"Movim Configuration" \
85 89
                        --form $"\\nPlease enter your Movim details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 12 65 2 \
@@ -106,7 +110,7 @@ function install_interactive_movim {
106 110
                     MOVIM_DOMAIN_NAME=
107 111
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
108 112
                 else
109
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
113
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
110 114
                         MOVIM_CODE=$(sed -n 2p < "$data")
111 115
                         validate_freedns_code "$MOVIM_CODE"
112 116
                         if [ ! "$VALID_CODE" ]; then

+ 4
- 0
src/freedombone-app-mumble ファイルの表示

@@ -40,6 +40,10 @@ MUMBLE_PORT=64738
40 40
 MUMBLE_DATABASE="mumble-server.sqlite"
41 41
 MUMBLE_CONFIG_FILE="mumble-server.ini"
42 42
 
43
+MUMBLE_SHORT_DESCRIPTION=$'Voice chat'
44
+MUMBLE_DESCRIPTION=$'Voice chat'
45
+MUMBLE_MOBILE_APP_URL='https://f-droid.org/packages/com.morlunk.mumbleclient'
46
+
43 47
 mumble_variables=(MY_USERNAME
44 48
                   DEFAULT_DOMAIN_NAME
45 49
                   MUMBLE_PORT

+ 25
- 8
src/freedombone-app-nextcloud ファイルの表示

@@ -38,8 +38,13 @@ NEXTCLOUD_CODE=
38 38
 NEXTCLOUD_ONION_PORT=8112
39 39
 NEXTCLOUD_REPO="https://github.com/nextcloud/server"
40 40
 # Stable 13 branch
41
-NEXTCLOUD_COMMIT='b16824db31cd00e26e72216bf995d52389b9c93c'
41
+NEXTCLOUD_COMMIT='edd5712c6ead5b09fa4f996cfda66fc4e18ba597'
42 42
 NEXTCLOUD_ADMIN_PASSWORD=
43
+NEXTCLOUD_SERVER_SIDE_ENCRYPTION=1
44
+
45
+NEXTCLOUD_SHORT_DESCRIPTION=$'File storage and sync'
46
+NEXTCLOUD_DESCRIPTION=$'File storage and sync'
47
+NEXTCLOUD_MOBILE_APP_URL='https://f-droid.org/packages/com.nextcloud.client'
43 48
 
44 49
 nextcloud_variables=(ONION_ONLY
45 50
                      NEXTCLOUD_DOMAIN_NAME
@@ -83,6 +88,16 @@ function install_interactive_nextcloud {
83 88
         ONION_ONLY='no'
84 89
     fi
85 90
 
91
+    dialog --title $"Enable NextCloud server side encryption" \
92
+           --backtitle $"Freedombone Configuration" \
93
+           --yesno $"\\nDo you want to enable server side encryption. On ARM or older x86 systems, especially without HRNG, this may make performance excessively slow?" 10 60
94
+    sel=$?
95
+    case $sel in
96
+        1) NEXTCLOUD_SERVER_SIDE_ENCRYPTION=
97
+           ;;
98
+        255) return;;
99
+    esac
100
+
86 101
     if [[ $ONION_ONLY != "no" ]]; then
87 102
         NEXTCLOUD_DOMAIN_NAME='nextcloud.local'
88 103
     else
@@ -90,7 +105,7 @@ function install_interactive_nextcloud {
90 105
         while [ ! $NEXTCLOUD_DETAILS_COMPLETE ]
91 106
         do
92 107
             data=$(mktemp 2>/dev/null)
93
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
108
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
94 109
                 dialog --backtitle $"Freedombone Configuration" \
95 110
                        --title $"NextCloud Configuration" \
96 111
                        --form $"\\nPlease enter your NextCloud details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 13 65 3 \
@@ -119,7 +134,7 @@ function install_interactive_nextcloud {
119 134
                     NEXTCLOUD_DOMAIN_NAME=
120 135
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
121 136
                 else
122
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
137
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
123 138
                         NEXTCLOUD_CODE=$(sed -n 2p < "$data")
124 139
                         validate_freedns_code "$NEXTCLOUD_CODE"
125 140
                         if [ ! "$VALID_CODE" ]; then
@@ -668,12 +683,14 @@ function install_nextcloud_main {
668 683
     sudo -u www-data ./occ check
669 684
     sudo -u www-data ./occ status
670 685
     sudo -u www-data ./occ app:list
671
-    sudo -u www-data ./occ app:enable encryption
672
-    if ! sudo -u www-data ./occ encryption:enable; then
673
-        echo $'Encryption not enabled'
674
-        exit 73527
686
+    if [ $NEXTCLOUD_SERVER_SIDE_ENCRYPTION ]; then
687
+        sudo -u www-data ./occ app:enable encryption
688
+        if ! sudo -u www-data ./occ encryption:enable; then
689
+            echo $'Encryption not enabled'
690
+            exit 73527
691
+        fi
692
+        sudo -u www-data ./occ encryption:status
675 693
     fi
676
-    sudo -u www-data ./occ encryption:status
677 694
     sudo -u www-data ./occ config:system:set appstoreenabled --value=false
678 695
     chmod g+w "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
679 696
     chown -R www-data:www-data "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs"

+ 5
- 0
src/freedombone-app-peertube ファイルの表示

@@ -33,6 +33,7 @@ VARIANTS="full full-vim media"
33 33
 
34 34
 IN_DEFAULT_INSTALL=0
35 35
 SHOW_ON_ABOUT=1
36
+NOT_ON_ONION=1
36 37
 
37 38
 PEERTUBE_DOMAIN_NAME=
38 39
 PEERTUBE_CODE=
@@ -43,6 +44,10 @@ PEERTUBE_PORT=9004
43 44
 MESH_PEERTUBE_PORT=8500
44 45
 PEERTUBE_DIR=/etc/peertube
45 46
 
47
+PEERTUBE_SHORT_DESCRIPTION=$'Video broadcast'
48
+PEERTUBE_DESCRIPTION=$'Video broadcast'
49
+PEERTUBE_MOBILE_APP_URL=
50
+
46 51
 peertube_variables=(PEERTUBE_DOMAIN_NAME
47 52
                     PEERTUBE_CODE
48 53
                     PEERTUBE_ADMIN_PASSWORD

+ 2
- 2
src/freedombone-app-pelican ファイルの表示

@@ -380,7 +380,7 @@ function install_interactive_pelican {
380 380
         while [ ! $PELICAN_DETAILS_COMPLETE ]
381 381
         do
382 382
             data=$(mktemp 2>/dev/null)
383
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
383
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
384 384
                 dialog --backtitle $"Freedombone Configuration" \
385 385
                        --title $"Pelican Blog Configuration" \
386 386
                        --form $"\\nPlease enter your blog details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 14 65 2 \
@@ -412,7 +412,7 @@ function install_interactive_pelican {
412 412
                     PELICAN_DOMAIN_NAME=
413 413
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
414 414
                 else
415
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
415
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
416 416
                         PELICAN_BLOG_CODE=$(sed -n 2p < "$data")
417 417
                         validate_freedns_code "$PELICAN_BLOG_CODE"
418 418
                         if [ ! "$VALID_CODE" ]; then

+ 7
- 3
src/freedombone-app-pleroma ファイルの表示

@@ -36,7 +36,7 @@ PLEROMA_CODE=
36 36
 PLEROMA_PORT=4000
37 37
 PLEROMA_ONION_PORT=8011
38 38
 PLEROMA_REPO="https://git.pleroma.social/pleroma/pleroma.git"
39
-PLEROMA_COMMIT='762f6edc29a7a48e3a663e9bedec58e0036ff363'
39
+PLEROMA_COMMIT='6b9a6838331210dd514d5ecda52783c183bd1bbf'
40 40
 PLEROMA_ADMIN_PASSWORD=
41 41
 PLEROMA_DIR=/etc/pleroma
42 42
 PLEROMA_SECRET_KEY=""
@@ -51,6 +51,10 @@ PLEROMA_EXPIRE_MONTHS=3
51 51
 pleroma_expire_posts_script=/usr/bin/pleroma-expire-posts
52 52
 blocking_script_file=/usr/bin/pleroma-blocking
53 53
 
54
+PLEROMA_SHORT_DESCRIPTION=$'Federated microblogging'
55
+PLEROMA_DESCRIPTION=$'Federated microblogging'
56
+PLEROMA_MOBILE_APP_URL='https://f-droid.org/packages/com.keylesspalace.tusky'
57
+
54 58
 pleroma_variables=(ONION_ONLY
55 59
                    PLEROMA_DOMAIN_NAME
56 60
                    PLEROMA_CODE
@@ -335,7 +339,7 @@ function install_interactive_pleroma {
335 339
         while [ ! $PLEROMA_DETAILS_COMPLETE ]
336 340
         do
337 341
             data=$(mktemp 2>/dev/null)
338
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
342
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
339 343
                 dialog --backtitle $"Freedombone Configuration" \
340 344
                        --title $"Pleroma Configuration" \
341 345
                        --form $"\\nPlease enter your Pleroma details. The background image URL can be left blank.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 16 65 4 \
@@ -379,7 +383,7 @@ function install_interactive_pleroma {
379 383
                     PLEROMA_DOMAIN_NAME=
380 384
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
381 385
                 else
382
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
386
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
383 387
                         PLEROMA_CODE=$(sed -n 4p < "$data")
384 388
                         validate_freedns_code "$PLEROMA_CODE"
385 389
                         if [ ! "$VALID_CODE" ]; then

+ 6
- 2
src/freedombone-app-postactiv ファイルの表示

@@ -45,6 +45,10 @@ POSTACTIV_TITLE='PostActiv'
45 45
 # Number of months after which posts expire
46 46
 POSTACTIV_EXPIRE_MONTHS=3
47 47
 
48
+POSTACTIV_SHORT_DESCRIPTION=$'Federated microblogging'
49
+POSTACTIV_DESCRIPTION=$'Federated microblogging'
50
+POSTACTIV_MOBILE_APP_URL='https://f-droid.org/packages/org.mariotaku.twidere/'
51
+
48 52
 postactiv_variables=(ONION_ONLY
49 53
                      POSTACTIV_DOMAIN_NAME
50 54
                      POSTACTIV_CODE
@@ -118,7 +122,7 @@ function install_interactive_postactiv {
118 122
         while [ ! $POSTACTIV_DETAILS_COMPLETE ]
119 123
         do
120 124
             data=$(mktemp 2>/dev/null)
121
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
125
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
122 126
                 dialog --backtitle $"Freedombone Configuration" \
123 127
                        --title $"PostActiv Configuration" \
124 128
                        --form $"\\nPlease enter your PostActiv details. The background image URL can be left blank.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 16 65 4 \
@@ -162,7 +166,7 @@ function install_interactive_postactiv {
162 166
                     POSTACTIV_DOMAIN_NAME=
163 167
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
164 168
                 else
165
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
169
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
166 170
                         POSTACTIV_CODE=$(sed -n 4p < "$data")
167 171
                         validate_freedns_code "$POSTACTIV_CODE"
168 172
                         if [ ! "$VALID_CODE" ]; then

+ 12
- 8
src/freedombone-app-privatebin ファイルの表示

@@ -38,6 +38,10 @@ PRIVATEBIN_REPO="https://github.com/PrivateBin/PrivateBin"
38 38
 PRIVATEBIN_COMMIT='9c132cd839fd5e91da18e4a1e8ebef64fce605fb'
39 39
 PRIVATEBIN_ADMIN_PASSWORD=
40 40
 
41
+PRIVATEBIN_SHORT_DESCRIPTION=$'Zero knowledge pastebin'
42
+PRIVATEBIN_DESCRIPTION=$'Zero knowledge pastebin'
43
+PRIVATEBIN_MOBILE_APP_URL=
44
+
41 45
 privatebin_variables=(ONION_ONLY
42 46
                       PRIVATEBIN_DOMAIN_NAME
43 47
                       PRIVATEBIN_CODE
@@ -55,6 +59,7 @@ function secure_privatebin {
55 59
 
56 60
     chown -R ${rootuser}:${htgroup} "${pbpath}/"
57 61
     chown -R www-data:www-data "${pbdata}"
62
+    chmod 755 "${pbdata}"
58 63
 }
59 64
 
60 65
 function logging_on_privatebin {
@@ -89,7 +94,7 @@ function install_interactive_privatebin {
89 94
         while [ ! $PRIVATEBIN_DETAILS_COMPLETE ]
90 95
         do
91 96
             data=$(mktemp 2>/dev/null)
92
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
97
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
93 98
                 dialog --backtitle $"Freedombone Configuration" \
94 99
                        --title $"PrivateBin Configuration" \
95 100
                        --form $"\\nPlease enter your PrivateBin details. The background image URL can be left blank.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 14 65 2 \
@@ -121,7 +126,7 @@ function install_interactive_privatebin {
121 126
                     PRIVATEBIN_DOMAIN_NAME=
122 127
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
123 128
                 else
124
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
129
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
125 130
                         PRIVATEBIN_CODE=$(sed -n 2p < "$data")
126 131
                         validate_freedns_code "$PRIVATEBIN_CODE"
127 132
                         if [ ! "$VALID_CODE" ]; then
@@ -153,15 +158,16 @@ function reconfigure_privatebin {
153 158
 }
154 159
 
155 160
 function upgrade_privatebin {
161
+    if grep -q "privatebin domain" "$COMPLETION_FILE"; then
162
+        PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
163
+    fi
164
+    chmod 755 "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/data"
165
+
156 166
     CURR_PRIVATEBIN_COMMIT=$(get_completion_param "privatebin commit")
157 167
     if [[ "$CURR_PRIVATEBIN_COMMIT" == "$PRIVATEBIN_COMMIT" ]]; then
158 168
         return
159 169
     fi
160 170
 
161
-    if grep -q "privatebin domain" "$COMPLETION_FILE"; then
162
-        PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
163
-    fi
164
-
165 171
     # update to the next commit
166 172
     function_check set_repo_commit
167 173
     set_repo_commit "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs" "privatebin commit" "$PRIVATEBIN_COMMIT" "$PRIVATEBIN_REPO"
@@ -436,8 +442,6 @@ function install_privatebin {
436 442
     sed -i 's|; qrcode|qrcode|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
437 443
     sed -i 's|default =.*|default = "1day"|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
438 444
     sed -i 's|languagedefault =.*|languagedefault = "en"|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
439
-    sed -i 's|1week =|; 1week =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
440
-    sed -i 's|1month =|; 1month =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
441 445
     sed -i 's|1year =|; 1year =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
442 446
     sed -i 's|never =|; never =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
443 447
     sed -i 's|limit = 10|limit = 30|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"

+ 4
- 4
src/freedombone-app-riot ファイルの表示

@@ -32,9 +32,9 @@ IN_DEFAULT_INSTALL=0
32 32
 SHOW_ON_ABOUT=1
33 33
 NOT_ON_ONION=1
34 34
 
35
-RIOT_VERSION='0.13.3'
35
+RIOT_VERSION='0.15.3'
36 36
 RIOT_FILENAME="riot-v${RIOT_VERSION}"
37
-RIOT_HASH='bcd6c2f4be018612ac76a71b58749a5edab1e02de7d145a22d9b9aa6e6a89129'
37
+RIOT_HASH='0aecaa1c0d1e387c1730fea33cdb01b1a296e6146b7aef6a819fa90d9efc026e'
38 38
 RIOT_DOWNLOAD_URL="https://github.com/vector-im/riot-web/releases/download/v${RIOT_VERSION}"
39 39
 RIOT_ONION_PORT=8115
40 40
 RIOT_ONION_HOSTNAME=
@@ -76,7 +76,7 @@ function install_interactive_riot {
76 76
         while [ ! $RIOT_DETAILS_COMPLETE ]
77 77
         do
78 78
             data=$(mktemp 2>/dev/null)
79
-            if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
79
+            if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
80 80
                 dialog --backtitle $"Freedombone Configuration" \
81 81
                        --title $"Riot Web user interface for Matrix" \
82 82
                        --form $"\\nPlease enter your details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 13 65 3 \
@@ -105,7 +105,7 @@ function install_interactive_riot {
105 105
                     RIOT_DOMAIN_NAME=
106 106
                     dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
107 107
                 else
108
-                    if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
108
+                    if [[ "$DDNS_PROVIDER" == *"freedns"* ]]; then
109 109
                         RIOT_CODE=$(sed -n 2p < "$data")
110 110
                         validate_freedns_code "$RIOT_CODE"
111 111
                         if [ ! "$VALID_CODE" ]; then

+ 343
- 0
src/freedombone-app-rocketchat ファイルの表示

@@ -0,0 +1,343 @@
1
+#!/bin/bash
2
+#
3
+#  _____               _           _
4
+# |   __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
5
+# |   __|  _| -_| -_| . | . |     | . | . |   | -_|
6
+# |__|  |_| |___|___|___|___|_|_|_|___|___|_|_|___|
7
+#
8
+#                              Freedom in the Cloud
9
+#
10
+# License
11
+# =======
12
+#
13
+# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
14
+#
15
+# This program is free software: you can redistribute it and/or modify
16
+# it under the terms of the GNU Affero General Public License as published by
17
+# the Free Software Foundation, either version 3 of the License, or
18
+# (at your option) any later version.
19
+#
20
+# This program is distributed in the hope that it will be useful,
21
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
+# GNU Affero General Public License for more details.
24
+#
25
+# You should have received a copy of the GNU Affero General Public License
26
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
27
+
28
+VARIANTS='full full-vim'
29
+
30
+IN_DEFAULT_INSTALL=0
31
+SHOW_ON_ABOUT=1
32
+NOT_ON_ARM=1
33
+
34
+ROCKETCHAT_DOMAIN_NAME=
35
+ROCKETCHAT_CODE=
36
+ROCKETCHAT_ONION_PORT=9722
37
+ROCKETCHAT_PORT_INTERNAL=3000
38
+
39
+ROCKETCHAT_SHORT_DESCRIPTION=$'Chat system'
40
+ROCKETCHAT_DESCRIPTION=$'Chat system'
41
+ROCKETCHAT_MOBILE_APP_URL=
42
+
43
+rocketchat_variables=(ONION_ONLY
44
+                      ROCKETCHAT_DOMAIN_NAME
45
+                      ROCKETCHAT_CODE
46
+                      DDNS_PROVIDER
47
+                      MY_USERNAME)
48
+
49
+function logging_on_rocketchat {
50
+    echo -n ''
51
+}
52
+
53
+function logging_off_rocketchat {
54
+    echo -n ''
55
+}
56
+
57
+function remove_user_rocketchat {
58
+    remove_username="$1"
59
+
60
+    "${PROJECT_NAME}-pass" -u "$remove_username" --rmapp rocketchat
61
+}
62
+
63
+function add_user_rocketchat {
64
+    new_username="$1"
65
+    new_user_password="$2"
66
+
67
+    "${PROJECT_NAME}-pass" -u "$new_username" -a rocketchat -p "$new_user_password"
68
+    echo '0'
69
+}
70
+
71
+function install_interactive_rocketchat {
72
+    if [ ! "$ONION_ONLY" ]; then
73
+        ONION_ONLY='no'
74
+    fi
75
+
76
+    if [[ "$ONION_ONLY" != "no" ]]; then
77
+        ROCKETCHAT_DOMAIN_NAME='rocketchat.local'
78
+        write_config_param "ROCKETCHAT_DOMAIN_NAME" "$ROCKETCHAT_DOMAIN_NAME"
79
+    else
80
+        interactive_site_details "rocketchat" "ROCKETCHAT_DOMAIN_NAME" "ROCKETCHAT_CODE"
81
+    fi
82
+    APP_INSTALLED=1
83
+}
84
+
85
+function change_password_rocketchat {
86
+    curr_username="$1"
87
+    new_user_password="$2"
88
+
89
+    read_config_param 'ROCKETCHAT_DOMAIN_NAME'
90
+
91
+    "${PROJECT_NAME}-pass" -u "$curr_username" -a rocketchat -p "$new_user_password"
92
+}
93
+
94
+function reconfigure_rocketchat {
95
+    # This is used if you need to switch identity. Dump old keys and generate new ones
96
+    echo -n ''
97
+}
98
+
99
+function upgrade_rocketchat {
100
+    echo -n ''
101
+}
102
+
103
+function backup_local_rocketchat {
104
+    ROCKETCHAT_DOMAIN_NAME='rocketchat'
105
+    if grep -q "rocketchat domain" "$COMPLETION_FILE"; then
106
+        ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
107
+    fi
108
+
109
+    source_directory=/var/snap/rocketchat-server
110
+
111
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
112
+
113
+    systemctl stop rocketchat
114
+
115
+    dest_directory=rocketchat
116
+    backup_directory_to_usb "$source_directory" $dest_directory
117
+
118
+    restart_site
119
+    systemctl start rocketchat
120
+}
121
+
122
+function restore_local_rocketchat {
123
+    if ! grep -q "rocketchat domain" "$COMPLETION_FILE"; then
124
+        return
125
+    fi
126
+    ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
127
+    if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
128
+        return
129
+    fi
130
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
131
+    systemctl stop rocketchat
132
+
133
+    temp_restore_dir=/root/temprocketchat
134
+    rocketchat_dir=/var/snap/rocketchat-server
135
+
136
+    restore_directory_from_usb $temp_restore_dir rocketchat
137
+    if [ -d $temp_restore_dir ]; then
138
+        if [ -d "$temp_restore_dir$rocketchat_dir" ]; then
139
+            cp -rp "$temp_restore_dir$rocketchat_dir"/* "$rocketchat_dir"/
140
+        else
141
+            if [ ! -d "$rocketchat_dir" ]; then
142
+                mkdir "$rocketchat_dir"
143
+            fi
144
+            cp -rp "$temp_restore_dir"/* "$rocketchat_dir"/
145
+        fi
146
+        rm -rf $temp_restore_dir
147
+    fi
148
+    systemctl start rocketchat
149
+
150
+    restart_site
151
+}
152
+
153
+function backup_remote_rocketchat {
154
+    ROCKETCHAT_DOMAIN_NAME='rocketchat'
155
+    if grep -q "rocketchat domain" "$COMPLETION_FILE"; then
156
+        ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
157
+    fi
158
+
159
+    source_directory=/var/snap/rocketchat-server
160
+
161
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
162
+    systemctl stop rocketchat
163
+
164
+    dest_directory=rocketchat
165
+    backup_directory_to_friend "$source_directory" $dest_directory
166
+
167
+    systemctl start rocketchat
168
+
169
+    restart_site
170
+}
171
+
172
+function restore_remote_rocketchat {
173
+    if ! grep -q "rocketchat domain" "$COMPLETION_FILE"; then
174
+        return
175
+    fi
176
+    ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
177
+    if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
178
+        return
179
+    fi
180
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
181
+    systemctl stop rocketchat
182
+
183
+    temp_restore_dir=/root/temprocketchat
184
+    rocketchat_dir=/var/snap/rocketchat-server
185
+
186
+    restore_directory_from_friend $temp_restore_dir rocketchat
187
+    if [ -d $temp_restore_dir ]; then
188
+        if [ -d "$temp_restore_dir$rocketchat_dir" ]; then
189
+            cp -rp "$temp_restore_dir$rocketchat_dir"/* "$rocketchat_dir"/
190
+        else
191
+            if [ ! -d "$rocketchat_dir" ]; then
192
+                mkdir "$rocketchat_dir"
193
+            fi
194
+            cp -rp $temp_restore_dir/* "$rocketchat_dir"/
195
+        fi
196
+        rm -rf $temp_restore_dir
197
+    fi
198
+    systemctl start rocketchat
199
+
200
+    restart_site
201
+}
202
+
203
+function remove_rocketchat {
204
+    nginx_dissite "$ROCKETCHAT_DOMAIN_NAME"
205
+    remove_certs "$ROCKETCHAT_DOMAIN_NAME"
206
+
207
+    remove_nodejs rocketchat
208
+
209
+    if [ -d "/var/www/$ROCKETCHAT_DOMAIN_NAME" ]; then
210
+        rm -rf "/var/www/$ROCKETCHAT_DOMAIN_NAME"
211
+    fi
212
+    if [ -f "/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME" ]; then
213
+        rm "/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME"
214
+    fi
215
+    remove_onion_service rocketchat "${ROCKETCHAT_ONION_PORT}"
216
+    if grep -q "rocketchat" /etc/crontab; then
217
+        sed -i "/rocketchat/d" /etc/crontab
218
+    fi
219
+    remove_app rocketchat
220
+    remove_completion_param install_rocketchat
221
+    sed -i '/rocketchat/d' "$COMPLETION_FILE"
222
+
223
+    remove_ddns_domain "$ROCKETCHAT_DOMAIN_NAME"
224
+
225
+    remove_snap rocketchat-server
226
+}
227
+
228
+function install_rocketchat {
229
+    install_snap rocketchat-server
230
+
231
+    install_nodejs rocketchat
232
+    if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
233
+        echo $'No domain name was given'
234
+        exit 3568356
235
+    fi
236
+
237
+    if [ -d "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs" ]; then
238
+        rm -rf "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
239
+    fi
240
+    mkdir -p "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
241
+
242
+    chmod g+w "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
243
+    chown -R www-data:www-data "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
244
+
245
+    add_ddns_domain "$ROCKETCHAT_DOMAIN_NAME"
246
+
247
+    ROCKETCHAT_ONION_HOSTNAME=$(add_onion_service rocketchat 80 "${ROCKETCHAT_ONION_PORT}")
248
+
249
+    rocketchat_nginx_site=/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME
250
+    if [[ "$ONION_ONLY" == "no" ]]; then
251
+        nginx_http_redirect "$ROCKETCHAT_DOMAIN_NAME" "index index.html"
252
+        { echo 'server {';
253
+          echo '  listen 443 ssl;';
254
+          echo '  #listen [::]:443 ssl;';
255
+          echo "  server_name $ROCKETCHAT_DOMAIN_NAME;";
256
+          echo ''; } >> "$rocketchat_nginx_site"
257
+        nginx_compress "$ROCKETCHAT_DOMAIN_NAME"
258
+        echo '' >> "$rocketchat_nginx_site"
259
+        echo '  # Security' >> "$rocketchat_nginx_site"
260
+        nginx_ssl "$ROCKETCHAT_DOMAIN_NAME"
261
+
262
+        nginx_security_options "$ROCKETCHAT_DOMAIN_NAME"
263
+
264
+        { echo '  add_header Strict-Transport-Security max-age=15768000;';
265
+          echo '';
266
+          echo '  # Logs';
267
+          echo '  access_log /dev/null;';
268
+          echo '  error_log /dev/null;';
269
+          echo '';
270
+          echo '  # Root';
271
+          echo "  root /var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs;";
272
+          echo '';
273
+          echo '  index index.html;';
274
+          echo '  # Location';
275
+          echo '  location / {'; } >> "$rocketchat_nginx_site"
276
+        nginx_limits "$ROCKETCHAT_DOMAIN_NAME" '15m'
277
+        { echo "    proxy_pass http://localhost:$ROCKETCHAT_PORT_INTERNAL;";
278
+          echo '    proxy_http_version 1.1;';
279
+          echo "    proxy_set_header Upgrade \$http_upgrade;";
280
+          echo "    proxy_set_header Connection \"upgrade\";"
281
+          echo "    proxy_set_header Host \$http_host;"
282
+          echo '';
283
+          echo "    proxy_set_header X-Real-IP \$remote_addr;";
284
+          echo "    proxy_set_header X-Forward-For \$proxy_add_x_forwarded_for;";
285
+          echo '    proxy_set_header X-Forward-Proto http;';
286
+          echo '    proxy_set_header X-Nginx-Proxy true;';
287
+          echo '';
288
+          echo '    proxy_redirect off;';
289
+          echo '  }';
290
+          echo '}'; } >> "$rocketchat_nginx_site"
291
+    else
292
+        echo -n '' > "$rocketchat_nginx_site"
293
+    fi
294
+    { echo 'server {';
295
+      echo "    listen 127.0.0.1:$ROCKETCHAT_ONION_PORT default_server;";
296
+      echo "    server_name $ROCKETCHAT_ONION_HOSTNAME;";
297
+      echo ''; } >> "$rocketchat_nginx_site"
298
+    nginx_compress "$ROCKETCHAT_DOMAIN_NAME"
299
+    echo '' >> "$rocketchat_nginx_site"
300
+    nginx_security_options "$ROCKETCHAT_DOMAIN_NAME"
301
+    { echo '';
302
+      echo '  # Logs';
303
+      echo '  access_log /dev/null;';
304
+      echo '  error_log /dev/null;';
305
+      echo '';
306
+      echo '  # Root';
307
+      echo "  root /var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs;";
308
+      echo '';
309
+      echo '  index index.html;';
310
+      echo '  # Location';
311
+      echo '  location / {'; } >> "$rocketchat_nginx_site"
312
+    nginx_limits "$ROCKETCHAT_DOMAIN_NAME" '15m'
313
+    { echo "    proxy_pass http://localhost:$ROCKETCHAT_PORT_INTERNAL;";
314
+      echo '    proxy_http_version 1.1;';
315
+      echo "    proxy_set_header Upgrade \$http_upgrade;";
316
+      echo "    proxy_set_header Connection \"upgrade\";"
317
+      echo "    proxy_set_header Host \$http_host;"
318
+      echo '';
319
+      echo "    proxy_set_header X-Real-IP \$remote_addr;";
320
+      echo "    proxy_set_header X-Forward-For \$proxy_add_x_forwarded_for;";
321
+      echo '    proxy_set_header X-Forward-Proto http;';
322
+      echo '    proxy_set_header X-Nginx-Proxy true;';
323
+      echo '';
324
+      echo '    proxy_redirect off;';
325
+      echo '  }';
326
+      echo '}'; } >> "$rocketchat_nginx_site"
327
+
328
+    # If content security is enabled then the https site won't load
329
+    sed -i 's|add_header Content-Security-Policy|#add_header Content-Security-Policy|g' "$rocketchat_nginx_site"
330
+
331
+    create_site_certificate "$ROCKETCHAT_DOMAIN_NAME" 'yes'
332
+
333
+    nginx_ensite "$ROCKETCHAT_DOMAIN_NAME"
334
+
335
+    systemctl restart nginx
336
+
337
+    "${PROJECT_NAME}-pass" -u "$MY_USERNAME" -a rocketchat -p "$ROCKETCHAT_ADMIN_PASSWORD"
338
+    set_completion_param "rocketchat domain" "$ROCKETCHAT_DOMAIN_NAME"
339
+
340
+    APP_INSTALLED=1
341
+}
342
+
343
+# NOTE: deliberately there is no "exit 0"

+ 409
- 0
src/freedombone-app-smolrss ファイルの表示

@@ -0,0 +1,409 @@
1
+#!/bin/bash
2
+#
3
+#  _____               _           _
4
+# |   __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
5
+# |   __|  _| -_| -_| . | . |     | . | . |   | -_|
6
+# |__|  |_| |___|___|___|___|_|_|_|___|___|_|_|___|
7
+#
8
+#                              Freedom in the Cloud
9
+#
10
+# License
11
+# =======
12
+#
13
+# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
14
+#
15
+# This program is free software: you can redistribute it and/or modify
16
+# it under the terms of the GNU Affero General Public License as published by
17
+# the Free Software Foundation, either version 3 of the License, or
18
+# (at your option) any later version.
19
+#
20
+# This program is distributed in the hope that it will be useful,
21
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
+# GNU Affero General Public License for more details.
24
+#
25
+# You should have received a copy of the GNU Affero General Public License
26
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
27
+
28
+VARIANTS='full full-vim'
29
+
30
+IN_DEFAULT_INSTALL=0
31
+SHOW_ON_ABOUT=1
32
+SHOW_ICANN_ADDRESS_ON_ABOUT=0
33
+
34
+SMOLRSS_DOMAIN_NAME=
35
+SMOLRSS_CODE=
36
+SMOLRSS_ONION_PORT=8751
37
+SMOLRSS_REPO="https://github.com/bashrc/smolrss"
38
+SMOLRSS_COMMIT='d9fca3fd76b95c601553a1264ff500c287211105'
39
+
40
+smolrss_variables=(ONION_ONLY
41
+                   SMOLRSS_DOMAIN_NAME
42
+                   SMOLRSS_CODE
43
+                   DDNS_PROVIDER
44
+                   MY_USERNAME)
45
+
46
+function logging_on_smolrss {
47
+    echo -n ''
48
+}
49
+
50
+function logging_off_smolrss {
51
+    echo -n ''
52
+}
53
+
54
+function remove_user_smolrss {
55
+    #remove_username="$1"
56
+    echo -n ''
57
+}
58
+
59
+function add_user_smolrss {
60
+    #new_username="$1"
61
+    #new_user_password="$2"
62
+
63
+    echo '0'
64
+}
65
+
66
+function install_interactive_smolrss {
67
+    echo -n ''
68
+    APP_INSTALLED=1
69
+}
70
+
71
+function change_password_smolrss {
72
+    #curr_username="$1"
73
+    #new_user_password="$2"
74
+    echo -n ''
75
+}
76
+
77
+function reconfigure_smolrss {
78
+    # This is used if you need to switch identity. Dump old keys and generate new ones
79
+    echo -n ''
80
+}
81
+
82
+function smolrss_add_feed {
83
+    data=$(mktemp 2>/dev/null)
84
+    dialog --backtitle $"Smol RSS" \
85
+           --title $"Add an RSS feed" \
86
+           --form "\\n" 8 60 3 \
87
+           $"Title:" 1 1 "" 1 12 40 256 \
88
+           $"Feed URL:" 2 1 "" 2 12 40 10000 \
89
+           2> "$data"
90
+    sel=$?
91
+    case $sel in
92
+        1) rm -f "$data"
93
+           return;;
94
+        255) rm -f "$data"
95
+             return;;
96
+    esac
97
+    title=$(sed -n 1p < "$data")
98
+    url=$(sed -n 2p < "$data")
99
+    rm -f "$data"
100
+
101
+    if [ ! "$title" ]; then
102
+        return
103
+    fi
104
+
105
+    if [ ! "$url" ]; then
106
+        return
107
+    fi
108
+
109
+    if [[ "$url" == *','* ]]; then
110
+        return
111
+    fi
112
+    if [[ "$url" != *'.'* ]]; then
113
+        return
114
+    fi
115
+
116
+    cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || return
117
+
118
+    if grep -q "${title}," feeds.txt; then
119
+        sed -i "s|${title},.*|${title},${url}|g" feeds.txt
120
+    else
121
+        echo "${title},${url}" >> feeds.txt
122
+    fi
123
+
124
+    ./create_feeds feeds.txt > feeds.xml
125
+    chown www-data:www-data feeds.txt
126
+
127
+    dialog --title $"Add an RSS feed" \
128
+           --msgbox $"${title} has been added" 6 70
129
+}
130
+
131
+function smolrss_remove_feed {
132
+    data=$(mktemp 2>/dev/null)
133
+    dialog --title $"Remove an RSS feed" \
134
+           --backtitle $"Smol RSS" \
135
+           --inputbox $"Enter the title of the feed to remove" 8 60 2>"$data"
136
+    sel=$?
137
+    case $sel in
138
+        0)
139
+            title=$(<"$data")
140
+            if [ "$title" ]; then
141
+                cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || return
142
+                if grep -q "${title}," feeds.txt; then
143
+                    sed -i "/${title},/d" feeds.xml
144
+                    ./create_feeds feeds.txt > feeds.xml
145
+                    chown www-data:www-data feeds.txt
146
+                    dialog --title $"Remove an RSS feed" \
147
+                           --msgbox $"${title} has been removed" 6 70
148
+                fi
149
+            fi
150
+            ;;
151
+    esac
152
+    rm -f "$data"
153
+}
154
+
155
+function configure_interactive_smolrss {
156
+    W=(1 $"Add an RSS feed"
157
+       2 $"Remove an RSS feed"
158
+       3 $'Edit all feeds'
159
+       4 $'Light theme'
160
+       5 $'Dark theme')
161
+
162
+    read_config_param SMOLRSS_DOMAIN_NAME
163
+
164
+    while true
165
+    do
166
+
167
+        # shellcheck disable=SC2068
168
+        selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Smol RSS" --menu $"Choose an operation, or ESC for main menu:" 14 70 5 "${W[@]}" 3>&2 2>&1 1>&3)
169
+
170
+        if [ ! "$selection" ]; then
171
+            break
172
+        fi
173
+        case $selection in
174
+            1) smolrss_add_feed
175
+               ;;
176
+            2) smolrss_remove_feed
177
+               ;;
178
+            3) editor "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs/feeds.txt"
179
+               cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || break
180
+               ./create_feeds feeds.txt > feeds.xml
181
+               chown www-data:www-data feeds.txt
182
+               ;;
183
+            4) cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || break
184
+               cp style.light.css style.css
185
+               chown www-data:www-data style.css
186
+               dialog --title $"Smol RSS theme" \
187
+                      --msgbox $"Switched theme to light" 6 50
188
+               ;;
189
+            5) cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || break
190
+               cp style.dark.css style.css
191
+               chown www-data:www-data style.css
192
+               dialog --title $"Smol RSS theme" \
193
+                      --msgbox $"Switched theme to dark" 6 50
194
+               ;;
195
+        esac
196
+    done
197
+}
198
+
199
+function upgrade_smolrss {
200
+    CURR_SMOLRSS_COMMIT=$(get_completion_param "smolrss commit")
201
+    if [[ "$CURR_SMOLRSS_COMMIT" == "$SMOLRSS_COMMIT" ]]; then
202
+        return
203
+    fi
204
+
205
+    if grep -q "smolrss domain" "$COMPLETION_FILE"; then
206
+        SMOLRSS_DOMAIN_NAME=$(get_completion_param "smolrss domain")
207
+    fi
208
+
209
+    # update to the next commit
210
+    set_repo_commit "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" "smolrss commit" "$SMOLRSS_COMMIT" "$SMOLRSS_REPO"
211
+
212
+    cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || return
213
+    ./create_feeds feeds.txt > feeds.xml
214
+
215
+    chown -R www-data:www-data "/var/www/${SMOLRSS_DOMAIN_NAME}/htdocs"
216
+}
217
+
218
+function backup_local_smolrss {
219
+    SMOLRSS_DOMAIN_NAME='smolrss'
220
+    if grep -q "smolrss domain" "$COMPLETION_FILE"; then
221
+        SMOLRSS_DOMAIN_NAME=$(get_completion_param "smolrss domain")
222
+    fi
223
+
224
+    source_directory=/var/www/${SMOLRSS_DOMAIN_NAME}/htdocs
225
+
226
+    suspend_site "${SMOLRSS_DOMAIN_NAME}"
227
+
228
+    dest_directory=smolrss
229
+    backup_directory_to_usb "$source_directory" $dest_directory
230
+
231
+    restart_site
232
+}
233
+
234
+function restore_local_smolrss {
235
+    if ! grep -q "smolrss domain" "$COMPLETION_FILE"; then
236
+        return
237
+    fi
238
+    SMOLRSS_DOMAIN_NAME=$(get_completion_param "smolrss domain")
239
+    if [ ! "$SMOLRSS_DOMAIN_NAME" ]; then
240
+        return
241
+    fi
242
+    suspend_site "${SMOLRSS_DOMAIN_NAME}"
243
+    temp_restore_dir=/root/tempsmolrss
244
+    smolrss_dir=/var/www/${SMOLRSS_DOMAIN_NAME}/htdocs
245
+
246
+    restore_directory_from_usb $temp_restore_dir smolrss
247
+    if [ -d $temp_restore_dir ]; then
248
+        if [ -d "$temp_restore_dir$smolrss_dir" ]; then
249
+            cp -rp "$temp_restore_dir$smolrss_dir"/* "$smolrss_dir"/
250
+        else
251
+            if [ ! -d "$smolrss_dir" ]; then
252
+                mkdir "$smolrss_dir"
253
+            fi
254
+            cp -rp "$temp_restore_dir"/* "$smolrss_dir"/
255
+        fi
256
+        chown -R www-data:www-data "$smolrss_dir"
257
+        rm -rf $temp_restore_dir
258
+    fi
259
+    restart_site
260
+}
261
+
262
+function backup_remote_smolrss {
263
+    SMOLRSS_DOMAIN_NAME='smolrss'
264
+    if grep -q "smolrss domain" "$COMPLETION_FILE"; then
265
+        SMOLRSS_DOMAIN_NAME=$(get_completion_param "smolrss domain")
266
+    fi
267
+
268
+    source_directory=/var/www/${SMOLRSS_DOMAIN_NAME}/htdocs
269
+
270
+    suspend_site "${SMOLRSS_DOMAIN_NAME}"
271
+
272
+    dest_directory=smolrss
273
+    backup_directory_to_friend "$source_directory" $dest_directory
274
+
275
+    restart_site
276
+}
277
+
278
+function restore_remote_smolrss {
279
+    if ! grep -q "smolrss domain" "$COMPLETION_FILE"; then
280
+        return
281
+    fi
282
+    SMOLRSS_DOMAIN_NAME=$(get_completion_param "smolrss domain")
283
+    if [ ! "$SMOLRSS_DOMAIN_NAME" ]; then
284
+        return
285
+    fi
286
+    suspend_site "${SMOLRSS_DOMAIN_NAME}"
287
+    temp_restore_dir=/root/tempsmolrss
288
+    smolrss_dir=/var/www/${SMOLRSS_DOMAIN_NAME}/htdocs
289
+
290
+    restore_directory_from_friend $temp_restore_dir smolrss
291
+    if [ -d $temp_restore_dir ]; then
292
+        if [ -d "$temp_restore_dir$smolrss_dir" ]; then
293
+            cp -rp "$temp_restore_dir$smolrss_dir"/* "$smolrss_dir"/
294
+        else
295
+            if [ ! -d "$smolrss_dir" ]; then
296
+                mkdir "$smolrss_dir"
297
+            fi
298
+            cp -rp $temp_restore_dir/* "$smolrss_dir"/
299
+        fi
300
+        chown -R www-data:www-data "$smolrss_dir"
301
+        rm -rf $temp_restore_dir
302
+    fi
303
+    restart_site
304
+}
305
+
306
+function remove_smolrss {
307
+    nginx_dissite "$SMOLRSS_DOMAIN_NAME"
308
+    remove_certs "$SMOLRSS_DOMAIN_NAME"
309
+
310
+
311
+    if [ -d "/var/www/$SMOLRSS_DOMAIN_NAME" ]; then
312
+        rm -rf "/var/www/$SMOLRSS_DOMAIN_NAME"
313
+    fi
314
+    if [ -f "/etc/nginx/sites-available/$SMOLRSS_DOMAIN_NAME" ]; then
315
+        rm "/etc/nginx/sites-available/$SMOLRSS_DOMAIN_NAME"
316
+    fi
317
+    remove_onion_service smolrss "${SMOLRSS_ONION_PORT}"
318
+    if grep -q "smolrss" /etc/crontab; then
319
+        sed -i "/smolrss/d" /etc/crontab
320
+    fi
321
+    remove_app smolrss
322
+    remove_completion_param install_smolrss
323
+    sed -i '/smolrss/d' "$COMPLETION_FILE"
324
+
325
+    remove_ddns_domain "$SMOLRSS_DOMAIN_NAME"
326
+}
327
+
328
+function install_smolrss {
329
+    apt-get -yq install php-gettext php-curl php-gd php-mysql git curl
330
+    apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl
331
+
332
+    SMOLRSS_DOMAIN_NAME='smolrss.local'
333
+
334
+    if [ -d "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" ]; then
335
+        rm -rf "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs"
336
+    fi
337
+    if [ -d /repos/smolrss ]; then
338
+        mkdir "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs"
339
+        cp -r -p /repos/smolrss/. "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs"
340
+        cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || exit 324687356
341
+        git pull
342
+    else
343
+        git_clone "$SMOLRSS_REPO" "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs"
344
+    fi
345
+
346
+    if [ ! -d "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" ]; then
347
+        echo $'Unable to clone smolrss repo'
348
+        exit 87525
349
+    fi
350
+
351
+    cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || exit 36587356
352
+    git checkout "$SMOLRSS_COMMIT" -b "$SMOLRSS_COMMIT"
353
+    set_completion_param "smolrss commit" "$SMOLRSS_COMMIT"
354
+
355
+    cp feeds.example.txt feeds.txt
356
+    ./create_feeds feeds.txt > feeds.xml
357
+
358
+    chmod g+w "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs"
359
+    chown -R www-data:www-data "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs"
360
+
361
+    add_ddns_domain "$SMOLRSS_DOMAIN_NAME"
362
+
363
+    SMOLRSS_ONION_HOSTNAME=$(add_onion_service smolrss 80 "${SMOLRSS_ONION_PORT}")
364
+
365
+    smolrss_nginx_site=/etc/nginx/sites-available/$SMOLRSS_DOMAIN_NAME
366
+    echo -n '' > "$smolrss_nginx_site"
367
+    { echo 'server {';
368
+      echo "    listen 127.0.0.1:$SMOLRSS_ONION_PORT default_server;";
369
+      echo "    server_name $SMOLRSS_ONION_HOSTNAME;";
370
+      echo ''; } >> "$smolrss_nginx_site"
371
+    nginx_compress "$SMOLRSS_DOMAIN_NAME"
372
+    echo '' >> "$smolrss_nginx_site"
373
+    nginx_security_options "$SMOLRSS_DOMAIN_NAME"
374
+    { echo '';
375
+      echo '    access_log /dev/null;';
376
+      echo '    error_log /dev/null;';
377
+      echo '';
378
+      echo "    root /var/www/$SMOLRSS_DOMAIN_NAME/htdocs;";
379
+      echo '';
380
+      echo '  index index.php;';
381
+      echo '  location ~ \.php {';
382
+      echo '    include snippets/fastcgi-php.conf;';
383
+      echo '    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';
384
+      echo '    fastcgi_read_timeout 30;';
385
+      echo '    fastcgi_param HTTPS off;';
386
+      echo '  }';
387
+      echo '';
388
+      echo '  # Location';
389
+      echo '  location / {'; } >> "$smolrss_nginx_site"
390
+    nginx_limits "$SMOLRSS_DOMAIN_NAME" '15m'
391
+    { echo "    try_files \$uri \$uri/ index.php?\$args;";
392
+      echo '  }';
393
+      echo '}'; } >> "$smolrss_nginx_site"
394
+
395
+    configure_php
396
+
397
+    nginx_ensite "$SMOLRSS_DOMAIN_NAME"
398
+
399
+    systemctl restart php7.0-fpm
400
+
401
+    systemctl restart nginx
402
+
403
+    "${PROJECT_NAME}-pass" -u "$MY_USERNAME" -a smolrss -p "$SMOLRSS_ADMIN_PASSWORD"
404
+    set_completion_param "smolrss domain" "$SMOLRSS_DOMAIN_NAME"
405
+
406
+    APP_INSTALLED=1
407
+}
408
+
409
+# NOTE: deliberately there is no "exit 0"

+ 17
- 20
src/freedombone-app-syncthing ファイルの表示

@@ -40,6 +40,10 @@ SYNCTHING_PORT=22000
40 40
 SYNCTHING_SHARED_DATA=/var/lib/syncthing/SyncShared
41 41
 SYNCTHING_USER_IDS_FILE='.syncthingids'
42 42
 
43
+SYNCTHING_SHORT_DESCRIPTION=$'File synchronization'
44
+SYNCTHING_DESCRIPTION=$'File synchronization'
45
+SYNCTHING_MOBILE_APP_URL='https://f-droid.org/packages/com.nutomic.syncthingandroid'
46
+
43 47
 syncthing_variables=(SYNCTHING_ID
44 48
                      SYNCTHING_CONFIG_PATH
45 49
                      SYNCTHING_CONFIG_FILE
@@ -213,33 +217,26 @@ function run_client_syncthing {
213 217
     SYNCTHING_CONFIG_FILE=~/.syncthingids
214 218
     SYNCTHING_ID=$(cat ~/.syncthing-server-id)
215 219
 
220
+    W=(1 $"Show device ID for ${PROJECT_NAME}"
221
+       2 $"Add an ID for another machine or device"
222
+       3 $"Remove an ID for another machine or device"
223
+       4 $"Manually edit device IDs")
224
+
216 225
     while true
217 226
     do
218
-        data=$(mktemp 2>/dev/null)
219
-        dialog --backtitle $"Freedombone User Control Panel" \
220
-               --title $"File Synchronization" \
221
-               --radiolist $"Choose an operation:" 12 70 6 \
222
-               1 $"Show device ID for ${PROJECT_NAME}" off \
223
-               2 $"Add an ID for another machine or device" off \
224
-               3 $"Remove an ID for another machine or device" off \
225
-               4 $"Manually edit device IDs" off \
226
-               5 $"Back to main menu" on 2> "$data"
227
-        sel=$?
228
-        case $sel in
229
-            1) rm -f "$data"
230
-               break;;
231
-            255) rm -f "$data"
232
-                 break;;
233
-        esac
234
-        case $(cat "$data") in
227
+        # shellcheck disable=SC2068
228
+        selection=$(dialog --backtitle $"Freedombone User Control Panel" --title $"File Synchronization" --menu $"Choose an operation, or ESC for main menu:" 12 70 6 "${W[@]}" 3>&2 2>&1 1>&3)
229
+
230
+        if [ ! "$selection" ]; then
231
+           break
232
+        fi
233
+
234
+        case $selection in
235 235
             1) syncthing_show_id;;
236 236
             2) syncthing_add_id;;
237 237
             3) syncthing_remove_id;;
238 238
             4) syncthing_manual_edit;;
239
-            5) rm -f "$data"
240
-               break;;
241 239
         esac
242
-        rm -f "$data"
243 240
     done
244 241
 }
245 242
 

+ 4
- 0
src/freedombone-app-turtl ファイルの表示

@@ -48,6 +48,10 @@ TURTL_BASE_DIR=/etc/turtl
48 48
 TURTL_SIGNUP_STRING='Signup a new user'
49 49
 turtl_users_file=$TURTL_BASE_DIR/api/controllers/users.lisp
50 50
 
51
+TURTL_SHORT_DESCRIPTION=$'Note taking'
52
+TURTL_DESCRIPTION=$'Note taking'
53
+TURTL_MOBILE_APP_URL=
54
+
51 55
 turtl_variables=(ONION_ONLY
52 56
                  DEFAULT_DOMAIN_NAME
53 57
                  TURTL_DOMAIN_NAME

+ 7
- 4
src/freedombone-app-xmpp ファイルの表示

@@ -43,8 +43,8 @@ XMPP_CIPHERS='"EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+
43 43
 XMPP_ECC_CURVE='"secp384r1"'
44 44
 
45 45
 prosody_latest_version='0.10'
46
-prosody_nightly=468
47
-prosody_nightly_hash='c72aaab1182a86090188284f443d2f819889ca242d4e955258ef60f4c7c9a1ba'
46
+prosody_nightly=478
47
+prosody_nightly_hash='884e773920dbcd0a748d05391235df3ff2b82285357b13cb347c99564512593e'
48 48
 prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly}
49 49
 prosody_nightly_url="https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz"
50 50
 
@@ -53,6 +53,10 @@ prosody_modules_filename='prosody-modules-20180322.tar.gz'
53 53
 prosody_modules_hash='982d0dfcef98e9cb9cee4cc3801b8ce9a503a32e44c32b99df6fe94545b90072'
54 54
 xmpp_encryption_warning=$"For security reasons, OMEMO or PGP encryption is required for conversations on this server."
55 55
 
56
+XMPP_SHORT_DESCRIPTION=$'Chat system'
57
+XMPP_DESCRIPTION=$'Chat system'
58
+XMPP_MOBILE_APP_URL='https://f-droid.org/packages/eu.siacs.conversations'
59
+
56 60
 xmpp_variables=(ONION_ONLY
57 61
                 INSTALLED_WITHIN_DOCKER
58 62
                 XMPP_CIPHERS
@@ -644,7 +648,6 @@ function remove_xmpp {
644 648
 
645 649
     function_check remove_onion_service
646 650
     remove_onion_service xmpp 5222 5223 5269
647
-    sed -i '/HiddenServiceVersion 2/d' "$ONION_SERVICES_FILE"
648 651
 
649 652
     apt-mark -q unhold prosody
650 653
     apt-get -yq remove --purge prosody
@@ -1133,7 +1136,7 @@ function install_xmpp {
1133 1136
     fi
1134 1137
     if ! grep -q "hidden_service_xmpp" "$ONION_SERVICES_FILE"; then
1135 1138
         { echo 'HiddenServiceDir /var/lib/tor/hidden_service_xmpp/';
1136
-          echo 'HiddenServiceVersion 2';
1139
+          echo 'HiddenServiceVersion 3';
1137 1140
           echo "HiddenServicePort 5222 127.0.0.1:5222";
1138 1141
           echo "HiddenServicePort 5269 127.0.0.1:5269"; } >> "$ONION_SERVICES_FILE"
1139 1142
         echo $'Added onion site for xmpp chat'

+ 45
- 0
src/freedombone-base-email ファイルの表示

@@ -1663,6 +1663,20 @@ function refresh_gpg_keys {
1663 1663
     fi
1664 1664
 }
1665 1665
 
1666
+function prevent_mail_process_overrun {
1667
+    # This prevents any large buildup of exim processes, perhaps due to
1668
+    # Tor unavailability, from disabling the server
1669
+    { echo '#!/bin/bash';
1670
+      echo "exim_ctr=\$(pgrep \"exim4\" | wc -l)";
1671
+      echo "if [ \"\$exim_ctr\" -gt 5 ]; then";
1672
+      echo '    systemctl stop exim4';
1673
+      echo '    exim -bp | exiqgrep -i | xargs exim -Mrm 2> /dev/null';
1674
+      echo '    systemctl start exim4';
1675
+      echo 'fi'; } > /usr/bin/exim_check
1676
+    chmod +x /usr/bin/exim_check
1677
+    cron_add_mins 5 '/usr/bin/exim_check'
1678
+}
1679
+
1666 1680
 function install_email {
1667 1681
     if [[ $SYSTEM_TYPE == "mesh"* ]]; then
1668 1682
         return
@@ -1675,8 +1689,39 @@ function install_email {
1675 1689
     check_email_address_exists
1676 1690
     install_email_basic
1677 1691
     configure_email_onion
1692
+    prevent_mail_process_overrun
1678 1693
 
1679 1694
     mark_completed "${FUNCNAME[0]}"
1680 1695
 }
1681 1696
 
1697
+function remove_ip_addresses_from_email_logs {
1698
+    { echo '#!/bin/bash';
1699
+      echo '';
1700
+      echo 'if grep -q "= /dev/null" /etc/php/7.0/fpm/php-fpm.conf; then';
1701
+      echo '    if [ -f /var/log/exim4/mainlog ]; then';
1702
+      echo '        rm /var/log/exim4/mainlog';
1703
+      echo '    fi';
1704
+      echo '    if [ -f /var/log/exim4/rejectlog ]; then';
1705
+      echo '        rm /var/log/exim4/rejectlog';
1706
+      echo '    fi';
1707
+      echo 'else';
1708
+      echo '    if [ -f /var/log/exim4/mainlog ]; then';
1709
+      echo "        if grep -q '\\[' /var/log/exim4/mainlog; then";
1710
+      echo "            tail -n 50 /var/log/exim4/mainlog | sed 's/\\[[^][]*\\]//g' > /tmp/.exim4_mainlog";
1711
+      echo '            chown Debian-exim:adm /tmp/.exim4_mainlog';
1712
+      echo '            mv /tmp/.exim4_mainlog /var/log/exim4/mainlog';
1713
+      echo '        fi';
1714
+      echo '    fi';
1715
+      echo '    if [ -f /var/log/exim4/rejectlog ]; then';
1716
+      echo "        if grep -q '\\[' /var/log/exim4/rejectlog; then";
1717
+      echo "            tail -n 50 /var/log/exim4/rejectlog | sed 's/\\[[^][]*\\]//g' > /tmp/.exim4_rejectlog";
1718
+      echo '            chown Debian-exim:adm /tmp/.exim4_rejectlog';
1719
+      echo '            mv /tmp/.exim4_rejectlog /var/log/exim4/rejectlog';
1720
+      echo '        fi';
1721
+      echo '    fi';
1722
+      echo 'fi'; } > /usr/bin/exim_log_tidy
1723
+    chmod +x /usr/bin/exim_log_tidy
1724
+    cron_add_mins 1 '/usr/bin/exim_log_tidy'
1725
+}
1726
+
1682 1727
 # NOTE: deliberately no exit 0

+ 14
- 27
src/freedombone-client ファイルの表示

@@ -6,6 +6,14 @@
6 6
 #
7 7
 #                              Freedom in the Cloud
8 8
 #
9
+# This is an optional command for setting up a client machine
10
+# to then be able to log into a server. It installs a few packages
11
+# for things like IRC and twiddles crypto settings.
12
+#
13
+# It may not be necessary to run this on client machines, and
14
+# is provided for some extra convenience on a Debian or Arch
15
+# based system.
16
+#
9 17
 # License
10 18
 # =======
11 19
 #
@@ -34,7 +42,6 @@ CURR_GROUP=$USER
34 42
 if [ -f /usr/bin/pacman ]; then
35 43
     CURR_GROUP='users'
36 44
 fi
37
-ENABLE_MONKEYSPHERE=
38 45
 
39 46
 # setup for a specific app
40 47
 SETUP_CLIENT_APP_NAME=
@@ -177,20 +184,12 @@ function configure_ssh_client {
177 184
             { echo "# ${PROJECT_NAME} settings start";
178 185
               echo 'Host *.onion';
179 186
               echo '  ServerAliveInterval 60';
180
-              echo '  ServerAliveCountMax 3'; } >> ~/.ssh/config
181
-
182
-            if [[ "$ENABLE_MONKEYSPHERE" == $'yes' || "$ENABLE_MONKEYSPHERE" == $'y' ]]; then
183
-                echo "  ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; $proxycmd'" >> ~/.ssh/config
184
-            else
185
-                echo "  ProxyCommand $proxycmd" >> ~/.ssh/config
186
-            fi
187
-            { echo 'Host *';
187
+              echo '  ServerAliveCountMax 3';
188
+              echo "  ProxyCommand $proxycmd";
189
+              echo 'Host *';
188 190
               echo '  ServerAliveInterval 60';
189
-              echo '  ServerAliveCountMax 3'; } >> ~/.ssh/config
190
-            if [[ "$ENABLE_MONKEYSPHERE" == $'yes' || "$ENABLE_MONKEYSPHERE" == $'y' ]]; then
191
-                echo '  ProxyCommand monkeysphere ssh-proxycommand %h %p' >> ~/.ssh/config
192
-            fi
193
-            echo "# ${PROJECT_NAME} settings end" >> ~/.ssh/config
191
+              echo '  ServerAliveCountMax 3';
192
+              echo "# ${PROJECT_NAME} settings end"; } >> ~/.ssh/config
194 193
         fi
195 194
     fi
196 195
 
@@ -205,16 +204,9 @@ function configure_ssh_client {
205 204
     echo $'and set it to "no".'
206 205
 }
207 206
 
208
-function configure_monkeysphere {
209
-    if [ -f /usr/bin/pacman ]; then
210
-        return
211
-    fi
212
-    sudo apt-get -yq install monkeysphere
213
-}
214
-
215 207
 function show_help {
216 208
     echo ''
217
-    echo $"${PROJECT_NAME}-client --monkeysphere [yes|no]"
209
+    echo $"${PROJECT_NAME}-client"
218 210
     echo ''
219 211
     exit 0
220 212
 }
@@ -322,10 +314,6 @@ do
322 314
             verify_ssh_server_key
323 315
             exit 0
324 316
             ;;
325
-        --monkeysphere|--ms|--monkey)
326
-            shift
327
-            ENABLE_MONKEYSPHERE=${1}
328
-            ;;
329 317
         *)
330 318
             # unknown option
331 319
             ;;
@@ -339,7 +327,6 @@ setup_client_app
339 327
 refresh_gpg_keys
340 328
 configure_ssh_client
341 329
 global_rate_limit
342
-configure_monkeysphere
343 330
 remove_known_hosts_entries
344 331
 echo $'Configuration complete'
345 332
 exit 0

+ 0
- 0
src/freedombone-config ファイルの表示


多くのファイルが変更されたため、一部のファイルはこの差分に表示されません