Browse Source

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

Bob Mottram 8 years ago
parent
commit
85757ed3ed

+ 18
- 6
doc/EN/app_pihole.org View File

32
 
32
 
33
 * On each client system within your local network
33
 * On each client system within your local network
34
 
34
 
35
+Make sure that you add the static IP address for the server to */etc/hosts*.
36
+
35
 #+begin_src bash
37
 #+begin_src bash
36
-sudo chattr -i /etc/resolv.conf
37
-sudo nano /etc/resolv.conf
38
+STATIC_IP=[your server static IP]
39
+sudo echo "$STATIC_IP [your domain name]" >> /etc/hosts
38
 #+end_src
40
 #+end_src
39
 
41
 
40
-Comment out any existing entries with a # character and add:
42
+On Arch/Parabola:
41
 
43
 
42
 #+begin_src bash
44
 #+begin_src bash
43
-nameserver [IPv4 address from the About screen]
45
+sudo pacman -S openresolv
46
+sudo sed -i "s|#name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
47
+sudo sed -i "s|name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
48
+sudo chattr -i /etc/resolv.conf
49
+sudo resolvconf -u
44
 #+end_src
50
 #+end_src
45
 
51
 
46
-Normally /resolv.conf/ will be overwritten every time your reboot, but you can prevent this with:
52
+Or on a Debian based system:
47
 
53
 
48
 #+begin_src bash
54
 #+begin_src bash
49
-sudo chattr +i /etc/resolv.conf
55
+sudo apt-get install resolvconf
56
+echo 'domain localdomain' > /tmp/resolvconf
57
+echo 'search localdomain' >> /tmp/resolvconf
58
+echo "nameserver $STATIC_IP" >> /tmp/resolvconf
59
+sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head
60
+sudo chattr -i /etc/resolv.conf
61
+sudo resolvconf -u
50
 #+end_src
62
 #+end_src
51
 
63
 
52
 * On your internet router
64
 * On your internet router

+ 21
- 1
src/freedombone-app-cryptpad View File

37
 CRYPTPAD_ONION_PORT=8119
37
 CRYPTPAD_ONION_PORT=8119
38
 CRYPTPAD_PORT=9003
38
 CRYPTPAD_PORT=9003
39
 CRYPTPAD_REPO="https://github.com/xwiki-labs/cryptpad"
39
 CRYPTPAD_REPO="https://github.com/xwiki-labs/cryptpad"
40
-CRYPTPAD_COMMIT='0b69973c179efc6f770a1127f07f67de3d6724d1'
40
+CRYPTPAD_COMMIT='52d344c3d1404d75d2bf4ae8845e5c024e85ec7f'
41
 CRYPTPAD_DIR=/etc/cryptpad
41
 CRYPTPAD_DIR=/etc/cryptpad
42
 
42
 
43
 cryptpad_variables=(ONION_ONLY)
43
 cryptpad_variables=(ONION_ONLY)
283
     echo '    try_files $uri =404;' >> $cryptpad_nginx_site
283
     echo '    try_files $uri =404;' >> $cryptpad_nginx_site
284
     echo '  }' >> $cryptpad_nginx_site
284
     echo '  }' >> $cryptpad_nginx_site
285
     echo '' >> $cryptpad_nginx_site
285
     echo '' >> $cryptpad_nginx_site
286
+    echo '  location ^~ /login/ {' >> $cryptpad_nginx_site
287
+    echo '    try_files $uri =404;' >> $cryptpad_nginx_site
288
+    echo '  }' >> $cryptpad_nginx_site
289
+    echo '' >> $cryptpad_nginx_site
290
+    echo '  location ^~ /about.html {' >> $cryptpad_nginx_site
291
+    echo '    try_files $uri =404;' >> $cryptpad_nginx_site
292
+    echo '  }' >> $cryptpad_nginx_site
293
+    echo '' >> $cryptpad_nginx_site
294
+    echo '  location ^~ /contact.html {' >> $cryptpad_nginx_site
295
+    echo '    try_files $uri =404;' >> $cryptpad_nginx_site
296
+    echo '  }' >> $cryptpad_nginx_site
297
+    echo '' >> $cryptpad_nginx_site
298
+    echo '  location ^~ /contact.html {' >> $cryptpad_nginx_site
299
+    echo '    try_files $uri =404;' >> $cryptpad_nginx_site
300
+    echo '  }' >> $cryptpad_nginx_site
301
+    echo '' >> $cryptpad_nginx_site
302
+    echo '  location ^~ /what-is-cryptpad.html {' >> $cryptpad_nginx_site
303
+    echo '    try_files $uri =404;' >> $cryptpad_nginx_site
304
+    echo '  }' >> $cryptpad_nginx_site
305
+    echo '' >> $cryptpad_nginx_site
286
     echo '  location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media)$ {' >> $cryptpad_nginx_site
306
     echo '  location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media)$ {' >> $cryptpad_nginx_site
287
     echo '    rewrite ^(.*)$ $1/ redirect;' >> $cryptpad_nginx_site
307
     echo '    rewrite ^(.*)$ $1/ redirect;' >> $cryptpad_nginx_site
288
     echo '  }' >> $cryptpad_nginx_site
308
     echo '  }' >> $cryptpad_nginx_site

+ 11
- 0
src/freedombone-app-ghost View File

34
 IN_DEFAULT_INSTALL=0
34
 IN_DEFAULT_INSTALL=0
35
 SHOW_ON_ABOUT=1
35
 SHOW_ON_ABOUT=1
36
 
36
 
37
+GHOST_VERSION=1.6.2
37
 GHOST_DOMAIN_NAME=
38
 GHOST_DOMAIN_NAME=
38
 GHOST_CODE=
39
 GHOST_CODE=
39
 GHOST_ONION_PORT=8104
40
 GHOST_ONION_PORT=8104
53
 
54
 
54
     kill_pid=$(ps aux | grep "ghost" | awk -F ' ' '{print $2}' | head -n 1)
55
     kill_pid=$(ps aux | grep "ghost" | awk -F ' ' '{print $2}' | head -n 1)
55
     kill -9 $kill_pid
56
     kill -9 $kill_pid
57
+
58
+    kill_pid=$(ps aux | grep "ghost" | awk -F ' ' '{print $2}' | head -n 1)
59
+    kill -9 $kill_pid
56
 }
60
 }
57
 
61
 
58
 function logging_on_ghost {
62
 function logging_on_ghost {
188
 }
192
 }
189
 
193
 
190
 function upgrade_ghost {
194
 function upgrade_ghost {
195
+    CURR_GHOST_VERSION=$(get_completion_param "ghost version")
196
+    if [[ "${CURR_GHOST_VERSION}" == "${GHOST_VERSION}" ]]; then
197
+        return
198
+    fi
199
+
191
     read_config_param GHOST_DOMAIN_NAME
200
     read_config_param GHOST_DOMAIN_NAME
192
 
201
 
193
     if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then
202
     if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then
195
     fi
204
     fi
196
 
205
 
197
     systemctl stop ghost
206
     systemctl stop ghost
207
+    ghost_bust
198
 
208
 
199
     cd /var/www/$GHOST_DOMAIN_NAME/htdocs
209
     cd /var/www/$GHOST_DOMAIN_NAME/htdocs
200
 
210
 
209
     chown -R root:root /usr/local/lib
219
     chown -R root:root /usr/local/lib
210
     chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
220
     chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
211
     systemctl restart ghost
221
     systemctl restart ghost
222
+    sed -i "s|ghost version.*|ghost version:${GHOST_VERSION}|g" ${COMPLETION_FILE}
212
 }
223
 }
213
 
224
 
214
 function backup_local_ghost {
225
 function backup_local_ghost {

+ 1
- 1
src/freedombone-app-gnusocial View File

37
 GNUSOCIAL_CODE=
37
 GNUSOCIAL_CODE=
38
 GNUSOCIAL_ONION_PORT=8087
38
 GNUSOCIAL_ONION_PORT=8087
39
 GNUSOCIAL_REPO="https://git.gnu.io/gnu/gnu-social.git"
39
 GNUSOCIAL_REPO="https://git.gnu.io/gnu/gnu-social.git"
40
-GNUSOCIAL_COMMIT='05a9c11c476b384e5ef3f3cc83b66406fcf7a378'
40
+GNUSOCIAL_COMMIT='d61375cb7fd9e3ac2dbba2b22d0d6461fb753892'
41
 GNUSOCIAL_ADMIN_PASSWORD=
41
 GNUSOCIAL_ADMIN_PASSWORD=
42
 
42
 
43
 GNUSOCIAL_BACKGROUND_IMAGE_URL=
43
 GNUSOCIAL_BACKGROUND_IMAGE_URL=

+ 5
- 7
src/freedombone-app-matrix View File

312
 function add_user_matrix {
312
 function add_user_matrix {
313
     new_username="$1"
313
     new_username="$1"
314
     new_user_password="$2"
314
     new_user_password="$2"
315
-    is_admin_user='-a'
316
 
315
 
317
-    if [[ "$new_username" != "$MY_USERNAME" ]]; then
318
-        is_admin_user=''
319
-    fi
316
+    read_config_param MY_USERNAME
317
+    read_config_param MATRIX_DOMAIN_NAME
320
 
318
 
321
     ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password"
319
     ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password"
322
 
320
 
323
-    if [[ $ONION_ONLY == 'no' ]]; then
324
-        retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user https://${MATRIX_DOMAIN_NAME})
321
+    if [[ "$new_username" != "$MY_USERNAME" ]]; then
322
+        echo 'no' | register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" http://localhost:${MATRIX_PORT}
325
     else
323
     else
326
-        retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user http://${MATRIX_DOMAIN_NAME})
324
+        echo 'yes' | register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a http://localhost:${MATRIX_PORT}
327
     fi
325
     fi
328
     echo "0"
326
     echo "0"
329
 }
327
 }

+ 1
- 1
src/freedombone-app-pihole View File

47
 PIHOLE_WHITELIST=$piholeDir/whitelist.txt
47
 PIHOLE_WHITELIST=$piholeDir/whitelist.txt
48
 
48
 
49
 PIHOLE_REPO="https://github.com/pi-hole/pi-hole"
49
 PIHOLE_REPO="https://github.com/pi-hole/pi-hole"
50
-PIHOLE_COMMIT='bef0a2fef08b39780610b8885407b855edd3ba49'
50
+PIHOLE_COMMIT='2ceeac41fe8e493f9040b54a7c82f1183ecf5566'
51
 
51
 
52
 pihole_variables=(ONION_ONLY
52
 pihole_variables=(ONION_ONLY
53
                   PIHOLE_IFACE
53
                   PIHOLE_IFACE

+ 3
- 1
src/freedombone-utils-gnusocialtools View File

33
 QVITTER_THEME_COMMIT='b5791cf935a6391c492cefa1ffa50cc3cea44c12'
33
 QVITTER_THEME_COMMIT='b5791cf935a6391c492cefa1ffa50cc3cea44c12'
34
 
34
 
35
 PLEROMA_REPO="https://gitgud.io/lambadalambda/pleroma-fe"
35
 PLEROMA_REPO="https://gitgud.io/lambadalambda/pleroma-fe"
36
-PLEROMA_COMMIT='7d59051fc5e93585d8d9858ac989d9ebf7aa3cf9'
36
+PLEROMA_COMMIT='cbe652f2d94d81fa54a37378b7ff014c4391ca5e'
37
 
37
 
38
 ARMADILLO_REPO="https://git.postactiv.com/maiya/Armadillo"
38
 ARMADILLO_REPO="https://git.postactiv.com/maiya/Armadillo"
39
 ARMADILLO_COMMIT='ec3938a678f373156c4cbf37926c9a5ab68222c4'
39
 ARMADILLO_COMMIT='ec3938a678f373156c4cbf37926c9a5ab68222c4'
409
     npm install -g eslint-plugin-promise@3.5.0
409
     npm install -g eslint-plugin-promise@3.5.0
410
     npm install -g moment@2.18.1
410
     npm install -g moment@2.18.1
411
     npm install -g node-sass@4.5.2
411
     npm install -g node-sass@4.5.2
412
+    npm install -g whatwg-fetch@2.0.3
412
     yarn
413
     yarn
413
     if [ -f $INSTALL_DIR/pleroma/dist/index.html ]; then
414
     if [ -f $INSTALL_DIR/pleroma/dist/index.html ]; then
414
         rm -rf $INSTALL_DIR/pleroma/dist/*
415
         rm -rf $INSTALL_DIR/pleroma/dist/*
452
     if [ -d $INSTALL_DIR/pleroma ]; then
453
     if [ -d $INSTALL_DIR/pleroma ]; then
453
         set_repo_commit $INSTALL_DIR/pleroma "${app_name} pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO
454
         set_repo_commit $INSTALL_DIR/pleroma "${app_name} pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO
454
         cd $INSTALL_DIR/pleroma
455
         cd $INSTALL_DIR/pleroma
456
+        yarn
455
         npm run build
457
         npm run build
456
         if [ ! -d $INSTALL_DIR/pleroma/dist ]; then
458
         if [ ! -d $INSTALL_DIR/pleroma/dist ]; then
457
             echo 'Unable to build pleroma'
459
             echo 'Unable to build pleroma'

+ 41
- 26
website/EN/app_pihole.html View File

3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
 <head>
5
 <head>
6
-<!-- 2016-11-12 Sat 23:53 -->
6
+<!-- 2017-08-22 Tue 10:50 -->
7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9
 <title></title>
9
 <title></title>
71
   pre.src-fortran:before { content: 'Fortran'; }
71
   pre.src-fortran:before { content: 'Fortran'; }
72
   pre.src-gnuplot:before { content: 'gnuplot'; }
72
   pre.src-gnuplot:before { content: 'gnuplot'; }
73
   pre.src-haskell:before { content: 'Haskell'; }
73
   pre.src-haskell:before { content: 'Haskell'; }
74
+  pre.src-hledger:before { content: 'hledger'; }
74
   pre.src-java:before { content: 'Java'; }
75
   pre.src-java:before { content: 'Java'; }
75
   pre.src-js:before { content: 'Javascript'; }
76
   pre.src-js:before { content: 'Javascript'; }
76
   pre.src-latex:before { content: 'LaTeX'; }
77
   pre.src-latex:before { content: 'LaTeX'; }
188
 @licstart  The following is the entire license notice for the
189
 @licstart  The following is the entire license notice for the
189
 JavaScript code in this tag.
190
 JavaScript code in this tag.
190
 
191
 
191
-Copyright (C) 2012-2013 Free Software Foundation, Inc.
192
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
192
 
193
 
193
 The JavaScript code in this tag is free software: you can
194
 The JavaScript code in this tag is free software: you can
194
 redistribute it and/or modify it under the terms of the GNU
195
 redistribute it and/or modify it under the terms of the GNU
263
 Also don't expect perfection. Though many ads may be blocked by this system some will still get through. It's a constant cat and mouse game between advertisers and blockers.
264
 Also don't expect perfection. Though many ads may be blocked by this system some will still get through. It's a constant cat and mouse game between advertisers and blockers.
264
 </p>
265
 </p>
265
 
266
 
266
-<div id="outline-container-org28ca84b" class="outline-2">
267
-<h2 id="org28ca84b">Set a static IP address</h2>
268
-<div class="outline-text-2" id="text-org28ca84b">
267
+<div id="outline-container-org4f58654" class="outline-2">
268
+<h2 id="org4f58654">Set a static IP address</h2>
269
+<div class="outline-text-2" id="text-org4f58654">
269
 <p>
270
 <p>
270
 Ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually <b>192.168.1.1</b> or <b>192.168.1.254</b>.
271
 Ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually <b>192.168.1.1</b> or <b>192.168.1.254</b>.
271
 </p>
272
 </p>
276
 </div>
277
 </div>
277
 </div>
278
 </div>
278
 
279
 
279
-<div id="outline-container-org8d14e27" class="outline-2">
280
-<h2 id="org8d14e27">On each client system within your local network</h2>
281
-<div class="outline-text-2" id="text-org8d14e27">
280
+<div id="outline-container-orgc2fe39b" class="outline-2">
281
+<h2 id="orgc2fe39b">On each client system within your local network</h2>
282
+<div class="outline-text-2" id="text-orgc2fe39b">
283
+<p>
284
+Make sure that you add the static IP address for the server to <b>/etc/hosts</b>.
285
+</p>
286
+
282
 <div class="org-src-container">
287
 <div class="org-src-container">
283
-<pre class="src src-bash">sudo chattr -i /etc/resolv.conf
284
-sudo nano /etc/resolv.conf
285
-</pre>
288
+<pre><code class="src src-bash"><span class="org-variable-name">STATIC_IP</span>=[your server static IP]
289
+sudo echo <span class="org-string">"$STATIC_IP [your domain name]"</span> &gt;&gt; /etc/hosts
290
+</code></pre>
286
 </div>
291
 </div>
287
 
292
 
288
 <p>
293
 <p>
289
-Comment out any existing entries with a # character and add:
294
+On Arch/Parabola:
290
 </p>
295
 </p>
291
 
296
 
292
 <div class="org-src-container">
297
 <div class="org-src-container">
293
-<pre class="src src-bash">nameserver [IPv4 address from the About screen]
294
-</pre>
298
+<pre><code class="src src-bash">sudo pacman -S openresolv
299
+sudo sed -i <span class="org-string">"s|#name_servers=.*|name_servers=$STATIC_IP|g"</span> /etc/resolvconf.conf
300
+sudo sed -i <span class="org-string">"s|name_servers=.*|name_servers=$STATIC_IP|g"</span> /etc/resolvconf.conf
301
+sudo chattr -i /etc/resolv.conf
302
+sudo resolvconf -u
303
+</code></pre>
295
 </div>
304
 </div>
296
 
305
 
297
 <p>
306
 <p>
298
-Normally <i>resolv.conf</i> will be overwritten every time your reboot, but you can prevent this with:
307
+Or on a Debian based system:
299
 </p>
308
 </p>
300
 
309
 
301
 <div class="org-src-container">
310
 <div class="org-src-container">
302
-<pre class="src src-bash">sudo chattr +i /etc/resolv.conf
303
-</pre>
311
+<pre><code class="src src-bash">sudo apt-get install resolvconf
312
+<span class="org-builtin">echo</span> <span class="org-string">'domain localdomain'</span> &gt; /tmp/resolvconf
313
+<span class="org-builtin">echo</span> <span class="org-string">'search localdomain'</span> &gt;&gt; /tmp/resolvconf
314
+<span class="org-builtin">echo</span> <span class="org-string">"nameserver $STATIC_IP"</span> &gt;&gt; /tmp/resolvconf
315
+sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head
316
+sudo chattr -i /etc/resolv.conf
317
+sudo resolvconf -u
318
+</code></pre>
304
 </div>
319
 </div>
305
 </div>
320
 </div>
306
 </div>
321
 </div>
307
 
322
 
308
-<div id="outline-container-orgb95e44f" class="outline-2">
309
-<h2 id="orgb95e44f">On your internet router</h2>
310
-<div class="outline-text-2" id="text-orgb95e44f">
323
+<div id="outline-container-org3124632" class="outline-2">
324
+<h2 id="org3124632">On your internet router</h2>
325
+<div class="outline-text-2" id="text-org3124632">
311
 <p>
326
 <p>
312
 If you can access the settings on your local internet router then this is the simplest way to provide ad blocking for all devices which connect to it. Unfortunately some router models don't let you edit the DNS settings and if that's the case you might want to consider getting a different router.
327
 If you can access the settings on your local internet router then this is the simplest way to provide ad blocking for all devices which connect to it. Unfortunately some router models don't let you edit the DNS settings and if that's the case you might want to consider getting a different router.
313
 </p>
328
 </p>
317
 </p>
332
 </p>
318
 </div>
333
 </div>
319
 
334
 
320
-<div id="outline-container-orge5bdb7f" class="outline-3">
321
-<h3 id="orge5bdb7f">LibreCMC</h3>
322
-<div class="outline-text-3" id="text-orge5bdb7f">
335
+<div id="outline-container-org2c8b1c5" class="outline-3">
336
+<h3 id="org2c8b1c5">LibreCMC</h3>
337
+<div class="outline-text-3" id="text-org2c8b1c5">
323
 <p>
338
 <p>
324
 On a router running LibreCMC from the <b>Network</b> menu select <b>DHCP and DNS</b>. Enter the static IP address of your Freedombone system within <b>DNS Forwardings</b>, then at the bottom of the page click on <b>Save &amp; Apply</b>. Any devices which connect to your router will now have ad blocking.
339
 On a router running LibreCMC from the <b>Network</b> menu select <b>DHCP and DNS</b>. Enter the static IP address of your Freedombone system within <b>DNS Forwardings</b>, then at the bottom of the page click on <b>Save &amp; Apply</b>. Any devices which connect to your router will now have ad blocking.
325
 </p>
340
 </p>
327
 </div>
342
 </div>
328
 </div>
343
 </div>
329
 
344
 
330
-<div id="outline-container-org71dabfb" class="outline-2">
331
-<h2 id="org71dabfb">Configuring block lists</h2>
332
-<div class="outline-text-2" id="text-org71dabfb">
345
+<div id="outline-container-orgff38fd6" class="outline-2">
346
+<h2 id="orgff38fd6">Configuring block lists</h2>
347
+<div class="outline-text-2" id="text-orgff38fd6">
333
 <p>
348
 <p>
334
 You can configure the block lists which the system uses by going to the <b>administrator control panel</b>, selecting <b>App Settings</b> then choosing <b>pihole</b>. You can also add any extra domain names to the whitelist if they're being wrongly blocked or to the blacklist if they're not blocked by the current lists.
349
 You can configure the block lists which the system uses by going to the <b>administrator control panel</b>, selecting <b>App Settings</b> then choosing <b>pihole</b>. You can also add any extra domain names to the whitelist if they're being wrongly blocked or to the blacklist if they're not blocked by the current lists.
335
 </p>
350
 </p>