瀏覽代碼

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

Bob Mottram 7 年之前
父節點
當前提交
a4c761059b

+ 2
- 1
doc/EN/devguide.org 查看文件

18
 
18
 
19
 There's a command which you can use to generate scripts for new apps. Some examples are as follows:
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
 #+begin_src bash
23
 #+begin_src bash
24
 freedombone-template --app [name] -e [email] -r [repo url] \
24
 freedombone-template --app [name] -e [email] -r [repo url] \
25
+                     --packages "cowsay libssl-dev" \
25
                      -c [commit] --php yes -d mariadb > \
26
                      -c [commit] --php yes -d mariadb > \
26
                      src/freedombone-app-myappname
27
                      src/freedombone-app-myappname
27
 #+end_src
28
 #+end_src

二進制
man/freedombone-template.1.gz 查看文件


+ 4
- 3
src/freedombone-app-gogs 查看文件

39
 GIT_ONION_PORT=8090
39
 GIT_ONION_PORT=8090
40
 GIT_ADMIN_PASSWORD=
40
 GIT_ADMIN_PASSWORD=
41
 GOGS_BIN=
41
 GOGS_BIN=
42
+GOGS_PORT=3145
42
 
43
 
43
 gogs_variables=(ONION_ONLY
44
 gogs_variables=(ONION_ONLY
44
                 GIT_ADMIN_PASSWORD
45
                 GIT_ADMIN_PASSWORD
596
           echo '    location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
597
           echo '    location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
597
         function_check nginx_limits
598
         function_check nginx_limits
598
         nginx_limits "${GIT_DOMAIN_NAME}" '10G'
599
         nginx_limits "${GIT_DOMAIN_NAME}" '10G'
599
-        { echo '        proxy_pass http://localhost:3000;';
600
+        { echo "        proxy_pass http://localhost:${GOGS_PORT};";
600
           echo '    }';
601
           echo '    }';
601
           echo '';
602
           echo '';
602
           echo '    fastcgi_buffers 64 4K;';
603
           echo '    fastcgi_buffers 64 4K;';
628
       echo '    location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
629
       echo '    location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
629
     function_check nginx_limits
630
     function_check nginx_limits
630
     nginx_limits "${GIT_DOMAIN_NAME}" '10G'
631
     nginx_limits "${GIT_DOMAIN_NAME}" '10G'
631
-    { echo '        proxy_pass http://localhost:3000;';
632
+    { echo "        proxy_pass http://localhost:${GOGS_PORT};";
632
       echo '    }';
633
       echo '    }';
633
       echo '';
634
       echo '';
634
       echo '    fastcgi_buffers 64 4K;';
635
       echo '    fastcgi_buffers 64 4K;';
713
         echo "DOMAIN = ${GIT_ONION_HOSTNAME}" >> ${GOGS_CONFIG_FILE}
714
         echo "DOMAIN = ${GIT_ONION_HOSTNAME}" >> ${GOGS_CONFIG_FILE}
714
         echo "ROOT_URL = http://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
715
         echo "ROOT_URL = http://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
715
     fi
716
     fi
716
-    { echo 'HTTP_PORT = 3000';
717
+    { echo "HTTP_PORT = ${GOGS_PORT}";
717
       echo "SSH_PORT = $SSH_PORT";
718
       echo "SSH_PORT = $SSH_PORT";
718
       echo 'SSH_DOMAIN = %(DOMAIN)s';
719
       echo 'SSH_DOMAIN = %(DOMAIN)s';
719
       echo "CERT_FILE = /etc/ssl/certs/${GIT_DOMAIN_NAME}.pem";
720
       echo "CERT_FILE = /etc/ssl/certs/${GIT_DOMAIN_NAME}.pem";

+ 3
- 1
src/freedombone-app-mailpile 查看文件

35
 MAILPILE_CODE=
35
 MAILPILE_CODE=
36
 MAILPILE_ONION_PORT=8103
36
 MAILPILE_ONION_PORT=8103
37
 MAILPILE_REPO="https://github.com/mailpile/Mailpile"
37
 MAILPILE_REPO="https://github.com/mailpile/Mailpile"
38
-MAILPILE_COMMIT='f82074d2ab5ccd65d14a6b3c6cd65aeb132831d7'
38
+MAILPILE_COMMIT='3f6ab53de90f85bca8c52e5511e78cd7aca5ef1f'
39
 MAILPILE_PORT=33411
39
 MAILPILE_PORT=33411
40
 
40
 
41
 mailpile_variables=(MAILPILE_REPO
41
 mailpile_variables=(MAILPILE_REPO
105
     pip install -r requirements.txt
105
     pip install -r requirements.txt
106
 
106
 
107
     chown -R mailpile:mailpile "/var/www/$MAILPILE_DOMAIN_NAME/mail"
107
     chown -R mailpile:mailpile "/var/www/$MAILPILE_DOMAIN_NAME/mail"
108
+    systemctl restart mailpile
108
 }
109
 }
109
 
110
 
110
 function backup_local_mailpile {
111
 function backup_local_mailpile {
171
     fi
172
     fi
172
 
173
 
173
     apt-get -yq install python-pip python-lxml python-dev libjpeg-dev
174
     apt-get -yq install python-pip python-lxml python-dev libjpeg-dev
175
+    apt-get -yq install openssl python-pgpdump python-cryptography libssl-dev
174
 
176
 
175
     if [ ! -d /var/www/$MAILPILE_DOMAIN_NAME ]; then
177
     if [ ! -d /var/www/$MAILPILE_DOMAIN_NAME ]; then
176
         mkdir /var/www/$MAILPILE_DOMAIN_NAME
178
         mkdir /var/www/$MAILPILE_DOMAIN_NAME

+ 19
- 6
src/freedombone-app-nextcloud 查看文件

38
 NEXTCLOUD_ONION_PORT=8112
38
 NEXTCLOUD_ONION_PORT=8112
39
 NEXTCLOUD_REPO="https://github.com/nextcloud/server"
39
 NEXTCLOUD_REPO="https://github.com/nextcloud/server"
40
 # Stable 13 branch
40
 # Stable 13 branch
41
-NEXTCLOUD_COMMIT='b16824db31cd00e26e72216bf995d52389b9c93c'
41
+NEXTCLOUD_COMMIT='edd5712c6ead5b09fa4f996cfda66fc4e18ba597'
42
 NEXTCLOUD_ADMIN_PASSWORD=
42
 NEXTCLOUD_ADMIN_PASSWORD=
43
+NEXTCLOUD_SERVER_SIDE_ENCRYPTION=1
43
 
44
 
44
 nextcloud_variables=(ONION_ONLY
45
 nextcloud_variables=(ONION_ONLY
45
                      NEXTCLOUD_DOMAIN_NAME
46
                      NEXTCLOUD_DOMAIN_NAME
83
         ONION_ONLY='no'
84
         ONION_ONLY='no'
84
     fi
85
     fi
85
 
86
 
87
+    dialog --title $"Enable NextCloud server side encryption" \
88
+           --backtitle $"Freedombone Configuration" \
89
+           --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
90
+    sel=$?
91
+    case $sel in
92
+        1) NEXTCLOUD_SERVER_SIDE_ENCRYPTION=
93
+           ;;
94
+        255) return;;
95
+    esac
96
+
86
     if [[ $ONION_ONLY != "no" ]]; then
97
     if [[ $ONION_ONLY != "no" ]]; then
87
         NEXTCLOUD_DOMAIN_NAME='nextcloud.local'
98
         NEXTCLOUD_DOMAIN_NAME='nextcloud.local'
88
     else
99
     else
668
     sudo -u www-data ./occ check
679
     sudo -u www-data ./occ check
669
     sudo -u www-data ./occ status
680
     sudo -u www-data ./occ status
670
     sudo -u www-data ./occ app:list
681
     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
682
+    if [ $NEXTCLOUD_SERVER_SIDE_ENCRYPTION ]; then
683
+        sudo -u www-data ./occ app:enable encryption
684
+        if ! sudo -u www-data ./occ encryption:enable; then
685
+            echo $'Encryption not enabled'
686
+            exit 73527
687
+        fi
688
+        sudo -u www-data ./occ encryption:status
675
     fi
689
     fi
676
-    sudo -u www-data ./occ encryption:status
677
     sudo -u www-data ./occ config:system:set appstoreenabled --value=false
690
     sudo -u www-data ./occ config:system:set appstoreenabled --value=false
678
     chmod g+w "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
691
     chmod g+w "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
679
     chown -R www-data:www-data "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs"
692
     chown -R www-data:www-data "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs"

+ 6
- 6
src/freedombone-app-privatebin 查看文件

55
 
55
 
56
     chown -R ${rootuser}:${htgroup} "${pbpath}/"
56
     chown -R ${rootuser}:${htgroup} "${pbpath}/"
57
     chown -R www-data:www-data "${pbdata}"
57
     chown -R www-data:www-data "${pbdata}"
58
+    chmod 755 "${pbdata}"
58
 }
59
 }
59
 
60
 
60
 function logging_on_privatebin {
61
 function logging_on_privatebin {
153
 }
154
 }
154
 
155
 
155
 function upgrade_privatebin {
156
 function upgrade_privatebin {
157
+    if grep -q "privatebin domain" "$COMPLETION_FILE"; then
158
+        PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
159
+    fi
160
+    chmod 755 "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/data"
161
+
156
     CURR_PRIVATEBIN_COMMIT=$(get_completion_param "privatebin commit")
162
     CURR_PRIVATEBIN_COMMIT=$(get_completion_param "privatebin commit")
157
     if [[ "$CURR_PRIVATEBIN_COMMIT" == "$PRIVATEBIN_COMMIT" ]]; then
163
     if [[ "$CURR_PRIVATEBIN_COMMIT" == "$PRIVATEBIN_COMMIT" ]]; then
158
         return
164
         return
159
     fi
165
     fi
160
 
166
 
161
-    if grep -q "privatebin domain" "$COMPLETION_FILE"; then
162
-        PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
163
-    fi
164
-
165
     # update to the next commit
167
     # update to the next commit
166
     function_check set_repo_commit
168
     function_check set_repo_commit
167
     set_repo_commit "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs" "privatebin commit" "$PRIVATEBIN_COMMIT" "$PRIVATEBIN_REPO"
169
     set_repo_commit "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs" "privatebin commit" "$PRIVATEBIN_COMMIT" "$PRIVATEBIN_REPO"
436
     sed -i 's|; qrcode|qrcode|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
438
     sed -i 's|; qrcode|qrcode|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
437
     sed -i 's|default =.*|default = "1day"|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
439
     sed -i 's|default =.*|default = "1day"|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
438
     sed -i 's|languagedefault =.*|languagedefault = "en"|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
440
     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
     sed -i 's|1year =|; 1year =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
441
     sed -i 's|1year =|; 1year =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
442
     sed -i 's|never =|; never =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
442
     sed -i 's|never =|; never =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
443
     sed -i 's|limit = 10|limit = 30|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
443
     sed -i 's|limit = 10|limit = 30|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"

+ 357
- 0
src/freedombone-app-rocketchat 查看文件

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
+
33
+ROCKETCHAT_DOMAIN_NAME=
34
+ROCKETCHAT_CODE=
35
+ROCKETCHAT_ONION_PORT=9722
36
+ROCKETCHAT_PORT_INTERNAL=3000
37
+
38
+rocketchat_variables=(ONION_ONLY
39
+                      ROCKETCHAT_DOMAIN_NAME
40
+                      ROCKETCHAT_CODE
41
+                      DDNS_PROVIDER
42
+                      MY_USERNAME)
43
+
44
+function logging_on_rocketchat {
45
+    echo -n ''
46
+}
47
+
48
+function logging_off_rocketchat {
49
+    echo -n ''
50
+}
51
+
52
+function remove_user_rocketchat {
53
+    remove_username="$1"
54
+
55
+    "${PROJECT_NAME}-pass" -u "$remove_username" --rmapp rocketchat
56
+}
57
+
58
+function add_user_rocketchat {
59
+    new_username="$1"
60
+    new_user_password="$2"
61
+
62
+    "${PROJECT_NAME}-pass" -u "$new_username" -a rocketchat -p "$new_user_password"
63
+    echo '0'
64
+}
65
+
66
+function install_interactive_rocketchat {
67
+    if [ ! "$ONION_ONLY" ]; then
68
+        ONION_ONLY='no'
69
+    fi
70
+
71
+    if [[ "$ONION_ONLY" != "no" ]]; then
72
+        ROCKETCHAT_DOMAIN_NAME='rocketchat.local'
73
+        write_config_param "ROCKETCHAT_DOMAIN_NAME" "$ROCKETCHAT_DOMAIN_NAME"
74
+    else
75
+        interactive_site_details "rocketchat" "ROCKETCHAT_DOMAIN_NAME" "ROCKETCHAT_CODE"
76
+    fi
77
+    APP_INSTALLED=1
78
+}
79
+
80
+function change_password_rocketchat {
81
+    curr_username="$1"
82
+    new_user_password="$2"
83
+
84
+    read_config_param 'ROCKETCHAT_DOMAIN_NAME'
85
+
86
+    "${PROJECT_NAME}-pass" -u "$curr_username" -a rocketchat -p "$new_user_password"
87
+}
88
+
89
+function reconfigure_rocketchat {
90
+    # This is used if you need to switch identity. Dump old keys and generate new ones
91
+    echo -n ''
92
+}
93
+
94
+function configure_interactive_rocketchat {
95
+    W=(1 $"Option 1"
96
+       2 $"Option 2")
97
+
98
+    while true
99
+    do
100
+        # shellcheck disable=SC2068
101
+        selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"rocketchat" --menu $"Choose an operation, or ESC for main menu:" 14 70 3 "${W[@]}" 3>&2 2>&1 1>&3)
102
+
103
+        if [ ! "$selection" ]; then
104
+            break
105
+        fi
106
+        case $selection in
107
+            1) # call some function for option 1
108
+            ;;
109
+            2) # call some function for option 2
110
+            ;;
111
+        esac
112
+    done
113
+}
114
+
115
+function upgrade_rocketchat {
116
+    echo -n ''
117
+}
118
+
119
+function backup_local_rocketchat {
120
+    ROCKETCHAT_DOMAIN_NAME='rocketchat'
121
+    if grep -q "rocketchat domain" "$COMPLETION_FILE"; then
122
+        ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
123
+    fi
124
+
125
+    source_directory=/var/snap/rocketchat-server
126
+
127
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
128
+
129
+    systemctl stop rocketchat
130
+
131
+    dest_directory=rocketchat
132
+    backup_directory_to_usb "$source_directory" $dest_directory
133
+
134
+    restart_site
135
+    systemctl start rocketchat
136
+}
137
+
138
+function restore_local_rocketchat {
139
+    if ! grep -q "rocketchat domain" "$COMPLETION_FILE"; then
140
+        return
141
+    fi
142
+    ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
143
+    if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
144
+        return
145
+    fi
146
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
147
+    systemctl stop rocketchat
148
+
149
+    temp_restore_dir=/root/temprocketchat
150
+    rocketchat_dir=/var/snap/rocketchat-server
151
+
152
+    restore_directory_from_usb $temp_restore_dir rocketchat
153
+    if [ -d $temp_restore_dir ]; then
154
+        if [ -d "$temp_restore_dir$rocketchat_dir" ]; then
155
+            cp -rp "$temp_restore_dir$rocketchat_dir"/* "$rocketchat_dir"/
156
+        else
157
+            if [ ! -d "$rocketchat_dir" ]; then
158
+                mkdir "$rocketchat_dir"
159
+            fi
160
+            cp -rp "$temp_restore_dir"/* "$rocketchat_dir"/
161
+        fi
162
+        rm -rf $temp_restore_dir
163
+    fi
164
+    systemctl start rocketchat
165
+
166
+    restart_site
167
+}
168
+
169
+function backup_remote_rocketchat {
170
+    ROCKETCHAT_DOMAIN_NAME='rocketchat'
171
+    if grep -q "rocketchat domain" "$COMPLETION_FILE"; then
172
+        ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
173
+    fi
174
+
175
+    source_directory=/var/snap/rocketchat-server
176
+
177
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
178
+    systemctl stop rocketchat
179
+
180
+    dest_directory=rocketchat
181
+    backup_directory_to_friend "$source_directory" $dest_directory
182
+
183
+    systemctl start rocketchat
184
+
185
+    restart_site
186
+}
187
+
188
+function restore_remote_rocketchat {
189
+    if ! grep -q "rocketchat domain" "$COMPLETION_FILE"; then
190
+        return
191
+    fi
192
+    ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
193
+    if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
194
+        return
195
+    fi
196
+    suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
197
+    systemctl stop rocketchat
198
+
199
+    temp_restore_dir=/root/temprocketchat
200
+    rocketchat_dir=/var/snap/rocketchat-server
201
+
202
+    restore_directory_from_friend $temp_restore_dir rocketchat
203
+    if [ -d $temp_restore_dir ]; then
204
+        if [ -d "$temp_restore_dir$rocketchat_dir" ]; then
205
+            cp -rp "$temp_restore_dir$rocketchat_dir"/* "$rocketchat_dir"/
206
+        else
207
+            if [ ! -d "$rocketchat_dir" ]; then
208
+                mkdir "$rocketchat_dir"
209
+            fi
210
+            cp -rp $temp_restore_dir/* "$rocketchat_dir"/
211
+        fi
212
+        rm -rf $temp_restore_dir
213
+    fi
214
+    systemctl start rocketchat
215
+
216
+    restart_site
217
+}
218
+
219
+function remove_rocketchat {
220
+    nginx_dissite "$ROCKETCHAT_DOMAIN_NAME"
221
+    remove_certs "$ROCKETCHAT_DOMAIN_NAME"
222
+
223
+    remove_nodejs rocketchat
224
+
225
+    if [ -d "/var/www/$ROCKETCHAT_DOMAIN_NAME" ]; then
226
+        rm -rf "/var/www/$ROCKETCHAT_DOMAIN_NAME"
227
+    fi
228
+    if [ -f "/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME" ]; then
229
+        rm "/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME"
230
+    fi
231
+    remove_onion_service rocketchat "${ROCKETCHAT_ONION_PORT}"
232
+    if grep -q "rocketchat" /etc/crontab; then
233
+        sed -i "/rocketchat/d" /etc/crontab
234
+    fi
235
+    remove_app rocketchat
236
+    remove_completion_param install_rocketchat
237
+    sed -i '/rocketchat/d' "$COMPLETION_FILE"
238
+
239
+    remove_ddns_domain "$ROCKETCHAT_DOMAIN_NAME"
240
+
241
+    snap remove rocketchat-server
242
+}
243
+
244
+function install_rocketchat {
245
+    apt-get -qy install snapd
246
+    snap install rocketchat-server
247
+
248
+    install_nodejs rocketchat
249
+    if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
250
+        echo $'No domain name was given'
251
+        exit 3568356
252
+    fi
253
+
254
+    if [ -d "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs" ]; then
255
+        rm -rf "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
256
+    fi
257
+    mkdir -p "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
258
+
259
+    chmod g+w "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
260
+    chown -R www-data:www-data "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
261
+
262
+    add_ddns_domain "$ROCKETCHAT_DOMAIN_NAME"
263
+
264
+    ROCKETCHAT_ONION_HOSTNAME=$(add_onion_service rocketchat 80 "${ROCKETCHAT_ONION_PORT}")
265
+
266
+    rocketchat_nginx_site=/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME
267
+    if [[ "$ONION_ONLY" == "no" ]]; then
268
+        nginx_http_redirect "$ROCKETCHAT_DOMAIN_NAME" "index index.html"
269
+        { echo 'server {';
270
+          echo '  listen 443 ssl;';
271
+          echo '  #listen [::]:443 ssl;';
272
+          echo "  server_name $ROCKETCHAT_DOMAIN_NAME;";
273
+          echo ''; } >> "$rocketchat_nginx_site"
274
+        nginx_compress "$ROCKETCHAT_DOMAIN_NAME"
275
+        echo '' >> "$rocketchat_nginx_site"
276
+        echo '  # Security' >> "$rocketchat_nginx_site"
277
+        nginx_ssl "$ROCKETCHAT_DOMAIN_NAME"
278
+
279
+        nginx_security_options "$ROCKETCHAT_DOMAIN_NAME"
280
+
281
+        { echo '  add_header Strict-Transport-Security max-age=15768000;';
282
+          echo '';
283
+          echo '  # Logs';
284
+          echo '  access_log /dev/null;';
285
+          echo '  error_log /dev/null;';
286
+          echo '';
287
+          echo '  # Root';
288
+          echo "  root /var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs;";
289
+          echo '';
290
+          echo '  index index.html;';
291
+          echo '  # Location';
292
+          echo '  location / {'; } >> "$rocketchat_nginx_site"
293
+        nginx_limits "$ROCKETCHAT_DOMAIN_NAME" '15m'
294
+        { echo "    proxy_pass http://localhost:$ROCKETCHAT_PORT_INTERNAL;";
295
+          echo '    proxy_http_version 1.1;';
296
+          echo "    proxy_set_header Upgrade \$http_upgrade;";
297
+          echo "    proxy_set_header Connection \"upgrade\";"
298
+          echo "    proxy_set_header Host \$http_host;"
299
+          echo '';
300
+          echo "    proxy_set_header X-Real-IP \$remote_addr;";
301
+          echo "    proxy_set_header X-Forward-For \$proxy_add_x_forwarded_for;";
302
+          echo '    proxy_set_header X-Forward-Proto http;';
303
+          echo '    proxy_set_header X-Nginx-Proxy true;';
304
+          echo '';
305
+          echo '    proxy_redirect off;';
306
+          echo '  }';
307
+          echo '}'; } >> "$rocketchat_nginx_site"
308
+    else
309
+        echo -n '' > "$rocketchat_nginx_site"
310
+    fi
311
+    { echo 'server {';
312
+      echo "    listen 127.0.0.1:$ROCKETCHAT_ONION_PORT default_server;";
313
+      echo "    server_name $ROCKETCHAT_ONION_HOSTNAME;";
314
+      echo ''; } >> "$rocketchat_nginx_site"
315
+    nginx_compress "$ROCKETCHAT_DOMAIN_NAME"
316
+    echo '' >> "$rocketchat_nginx_site"
317
+    nginx_security_options "$ROCKETCHAT_DOMAIN_NAME"
318
+    { echo '';
319
+      echo '  # Logs';
320
+      echo '  access_log /dev/null;';
321
+      echo '  error_log /dev/null;';
322
+      echo '';
323
+      echo '  # Root';
324
+      echo "  root /var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs;";
325
+      echo '';
326
+      echo '  index index.html;';
327
+      echo '  # Location';
328
+      echo '  location / {'; } >> "$rocketchat_nginx_site"
329
+    nginx_limits "$ROCKETCHAT_DOMAIN_NAME" '15m'
330
+    { echo "    proxy_pass http://localhost:$ROCKETCHAT_PORT_INTERNAL;";
331
+      echo '    proxy_http_version 1.1;';
332
+      echo "    proxy_set_header Upgrade \$http_upgrade;";
333
+      echo "    proxy_set_header Connection \"upgrade\";"
334
+      echo "    proxy_set_header Host \$http_host;"
335
+      echo '';
336
+      echo "    proxy_set_header X-Real-IP \$remote_addr;";
337
+      echo "    proxy_set_header X-Forward-For \$proxy_add_x_forwarded_for;";
338
+      echo '    proxy_set_header X-Forward-Proto http;';
339
+      echo '    proxy_set_header X-Nginx-Proxy true;';
340
+      echo '';
341
+      echo '    proxy_redirect off;';
342
+      echo '  }';
343
+      echo '}'; } >> "$rocketchat_nginx_site"
344
+
345
+    create_site_certificate "$ROCKETCHAT_DOMAIN_NAME" 'yes'
346
+
347
+    nginx_ensite "$ROCKETCHAT_DOMAIN_NAME"
348
+
349
+    systemctl restart nginx
350
+
351
+    "${PROJECT_NAME}-pass" -u "$MY_USERNAME" -a rocketchat -p "$ROCKETCHAT_ADMIN_PASSWORD"
352
+    set_completion_param "rocketchat domain" "$ROCKETCHAT_DOMAIN_NAME"
353
+
354
+    APP_INSTALLED=1
355
+}
356
+
357
+# NOTE: deliberately there is no "exit 0"

+ 2
- 2
src/freedombone-image-customise 查看文件

1661
         mkdir -p "$rootdir/root/build"
1661
         mkdir -p "$rootdir/root/build"
1662
     fi
1662
     fi
1663
     chroot "$rootdir" apt-get -yq install build-essential curl libgnutls28-dev automake1.11 libconfuse-dev
1663
     chroot "$rootdir" apt-get -yq install build-essential curl libgnutls28-dev automake1.11 libconfuse-dev
1664
-    chroot "$rootdir" apt-get -yq install gnutls-dev libconfuse-dev pkg-config libssl-dev
1664
+    chroot "$rootdir" apt-get -yq install gnutls-dev libconfuse-dev pkg-config
1665
 
1665
 
1666
     if [ -d /repos/inadyn ]; then
1666
     if [ -d /repos/inadyn ]; then
1667
         mkdir "$rootdir/root/build/inadyn"
1667
         mkdir "$rootdir/root/build/inadyn"
1683
     { echo '#!/bin/bash';
1683
     { echo '#!/bin/bash';
1684
       echo 'cd ~/build/inadyn';
1684
       echo 'cd ~/build/inadyn';
1685
       echo './autogen.sh';
1685
       echo './autogen.sh';
1686
-      echo './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-openssl';
1686
+      echo './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var';
1687
       echo 'make -j5';
1687
       echo 'make -j5';
1688
       echo 'make install-strip'; } > "$rootdir/root/build/build_inadyn.sh"
1688
       echo 'make install-strip'; } > "$rootdir/root/build/build_inadyn.sh"
1689
     chmod +x "$rootdir/root/build/build_inadyn.sh"
1689
     chmod +x "$rootdir/root/build/build_inadyn.sh"

+ 104
- 63
src/freedombone-template 查看文件

32
 app_name_lower=$(echo "${app_name}" | tr '[:upper:]' '[:lower:]')
32
 app_name_lower=$(echo "${app_name}" | tr '[:upper:]' '[:lower:]')
33
 app_name=$app_name_lower
33
 app_name=$app_name_lower
34
 app_name_upper=$(echo "${app_name}" | tr '[:lower:]' '[:upper:]')
34
 app_name_upper=$(echo "${app_name}" | tr '[:lower:]' '[:upper:]')
35
-app_repo="TODO"
35
+app_repo=
36
 app_repo_commit='TODO'
36
 app_repo_commit='TODO'
37
 app_php=
37
 app_php=
38
 app_node=
38
 app_node=
47
 your_email=''
47
 your_email=''
48
 SHOW_ON_ABOUT=1
48
 SHOW_ON_ABOUT=1
49
 database_type=''
49
 database_type=''
50
+debian_packages=
51
+snap_packages=
50
 
52
 
51
 function show_help {
53
 function show_help {
52
     echo ''
54
     echo ''
67
     echo $'     --nodeapp [package]                      Specify a nodejs package to install'
69
     echo $'     --nodeapp [package]                      Specify a nodejs package to install'
68
     echo $'  -o --onion [yes|no]                         Is this app only available on an onion address?'
70
     echo $'  -o --onion [yes|no]                         Is this app only available on an onion address?'
69
     echo $'  -p --php [yes|no]                           Is this a PHP app?'
71
     echo $'  -p --php [yes|no]                           Is this a PHP app?'
72
+    echo $'     --packages [list of deb package names]   Debian packages to be installed'
73
+    echo $'     --snaps [list of snap package names]     Snap packages to be installed'
70
     echo $'  -s --daemon [yes|no]                        Add a daemon'
74
     echo $'  -s --daemon [yes|no]                        Add a daemon'
71
     echo $'  -d --database [mariadb|postgresql|mongodb]  Type of database'
75
     echo $'  -d --database [mariadb|postgresql|mongodb]  Type of database'
72
     echo $'  -w --web [yes|no]                           Whether there is a web user interface (default is yes)'
76
     echo $'  -w --web [yes|no]                           Whether there is a web user interface (default is yes)'
73
     echo $'     --dir [directory]                        Where to install to'
77
     echo $'     --dir [directory]                        Where to install to'
78
+    echo $'  -i --internalport [number]                  Internal port number for the daemon'
74
     echo ''
79
     echo ''
75
     exit 0
80
     exit 0
76
 }
81
 }
110
             shift
115
             shift
111
             database_type="$1"
116
             database_type="$1"
112
             ;;
117
             ;;
118
+        -i|--internal|--internalport)
119
+            shift
120
+            app_port_internal="$1"
121
+            ;;
113
         -p|--php)
122
         -p|--php)
114
             shift
123
             shift
115
             app_php="$1"
124
             app_php="$1"
152
             shift
161
             shift
153
             app_dir="$1"
162
             app_dir="$1"
154
             ;;
163
             ;;
164
+        --packages|--package)
165
+            shift
166
+            debian_packages="$1"
167
+            ;;
168
+        --snaps|--snap)
169
+            shift
170
+            snap_packages="$1"
171
+            ;;
155
         *)
172
         *)
156
             # unknown option
173
             # unknown option
157
             ;;
174
             ;;
251
     echo "${app_name_upper}_PORT=$app_port"
268
     echo "${app_name_upper}_PORT=$app_port"
252
 fi
269
 fi
253
 echo "${app_name_upper}_ONION_PORT=$(( ( RANDOM % 1000 )  + 9010 ))"
270
 echo "${app_name_upper}_ONION_PORT=$(( ( RANDOM % 1000 )  + 9010 ))"
254
-echo "${app_name_upper}_REPO=\"${app_repo}\""
255
-echo "${app_name_upper}_COMMIT='${app_repo_commit}'"
271
+if [ "$app_repo" ]; then
272
+    echo "${app_name_upper}_REPO=\"${app_repo}\""
273
+    echo "${app_name_upper}_COMMIT='${app_repo_commit}'"
274
+fi
256
 if [ $app_daemon ]; then
275
 if [ $app_daemon ]; then
257
     if [ ! "$app_port_internal" ]; then
276
     if [ ! "$app_port_internal" ]; then
258
         echo "${app_name_upper}_PORT_INTERNAL=TODO"
277
         echo "${app_name_upper}_PORT_INTERNAL=TODO"
379
 echo '}'
398
 echo '}'
380
 echo ''
399
 echo ''
381
 echo "function upgrade_${app_name} {"
400
 echo "function upgrade_${app_name} {"
382
-echo "    CURR_${app_name_upper}_COMMIT=\$(get_completion_param \"${app_name} commit\")"
383
-echo "    if [[ \"\$CURR_${app_name_upper}_COMMIT\" == \"\$${app_name_upper}_COMMIT\" ]]; then"
384
-echo '        return'
385
-echo '    fi'
386
-if [ $app_webui ]; then
387
-    echo ''
388
-    echo "    if grep -q \"${app_name} domain\" \"\$COMPLETION_FILE\"; then"
389
-    echo "        ${app_name_upper}_DOMAIN_NAME=\$(get_completion_param \"${app_name} domain\")"
390
-    echo '    fi'
391
-fi
392
-echo ''
393
-echo '    # update to the next commit'
394
-if [ ! "$app_dir" ]; then
395
-    echo "    set_repo_commit \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
396
-    echo "    chown -R www-data:www-data \"/var/www/\${${app_name_upper}_DOMAIN_NAME}/htdocs\""
401
+if [ ! "$app_repo" ]; then
402
+    echo "echo -n ''"
397
 else
403
 else
398
-    echo "    set_repo_commit \"${app_dir}\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
399
-    echo "    chown -R ${app_name}:${app_name} \"${app_dir}\""
400
-fi
401
-if [ $app_daemon ]; then
402
-    echo "    systemctl restart ${app_name}"
404
+    echo "    CURR_${app_name_upper}_COMMIT=\$(get_completion_param \"${app_name} commit\")"
405
+    echo "    if [[ \"\$CURR_${app_name_upper}_COMMIT\" == \"\$${app_name_upper}_COMMIT\" ]]; then"
406
+    echo '        return'
407
+    echo '    fi'
408
+    if [ $app_webui ]; then
409
+        echo ''
410
+        echo "    if grep -q \"${app_name} domain\" \"\$COMPLETION_FILE\"; then"
411
+        echo "        ${app_name_upper}_DOMAIN_NAME=\$(get_completion_param \"${app_name} domain\")"
412
+        echo '    fi'
413
+    fi
414
+    echo ''
415
+    echo '    # update to the next commit'
416
+    if [ ! "$app_dir" ]; then
417
+        echo "    set_repo_commit \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
418
+        echo "    chown -R www-data:www-data \"/var/www/\${${app_name_upper}_DOMAIN_NAME}/htdocs\""
419
+    else
420
+        echo "    set_repo_commit \"${app_dir}\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
421
+        echo "    chown -R ${app_name}:${app_name} \"${app_dir}\""
422
+    fi
423
+    if [ $app_daemon ]; then
424
+        echo "    systemctl restart ${app_name}"
425
+    fi
403
 fi
426
 fi
404
 echo '}'
427
 echo '}'
405
 echo ''
428
 echo ''
710
     echo ''
733
     echo ''
711
     echo "    remove_ddns_domain \"\$${app_name_upper}_DOMAIN_NAME\""
734
     echo "    remove_ddns_domain \"\$${app_name_upper}_DOMAIN_NAME\""
712
 fi
735
 fi
736
+if [ "$snap_packages" ]; then
737
+    echo ''
738
+    echo "    snap remove ${snap_packages}"
739
+fi
713
 echo '}'
740
 echo '}'
714
 echo ''
741
 echo ''
715
 echo "function install_${app_name} {"
742
 echo "function install_${app_name} {"
743
+if [ "$debian_packages" ]; then
744
+    echo "    apt-get -qy install ${debian_packages}"
745
+    echo ''
746
+fi
747
+if [ "$snap_packages" ]; then
748
+    echo '    apt-get -qy install snapd'
749
+    echo "    snap install ${snap_packages}"
750
+    echo ''
751
+fi
716
 if [[ "$database_type" == "mariadb" || "$database_type" == "mysql" ]]; then
752
 if [[ "$database_type" == "mariadb" || "$database_type" == "mysql" ]]; then
717
     echo '    install_mariadb'
753
     echo '    install_mariadb'
718
     echo ''
754
     echo ''
750
     echo '    fi'
786
     echo '    fi'
751
 fi
787
 fi
752
 
788
 
753
-echo "    if [ -d /repos/${app_name} ]; then"
754
-if [ $app_webui ]; then
755
-    echo "        mkdir \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
756
-fi
757
-if [ ! "$app_dir" ]; then
758
-    echo "        cp -r -p /repos/${app_name}/. \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
759
-    echo "        cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 324687356"
760
-else
761
-    echo "        cp -r -p /repos/${app_name}/. \"${app_dir}\""
762
-    echo "        cd \"${app_dir}\" || exit 36487365"
763
-fi
764
-echo '        git pull'
765
-echo '    else'
766
-if [ ! "$app_dir" ]; then
767
-    echo "        git_clone \"\$${app_name_upper}_REPO\" \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
768
-else
769
-    echo "        git_clone \"\$${app_name_upper}_REPO\" \"${app_dir}\""
770
-fi
771
-echo '    fi'
772
-echo ''
773
-if [ ! "$app_dir" ]; then
774
-    echo "    if [ ! -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" ]; then"
789
+if [ "$app_repo" ]; then
790
+    echo "    if [ -d /repos/${app_name} ]; then"
791
+    if [ $app_webui ]; then
792
+        echo "        mkdir \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
793
+    fi
794
+    if [ ! "$app_dir" ]; then
795
+        echo "        cp -r -p /repos/${app_name}/. \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
796
+        echo "        cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 324687356"
797
+    else
798
+        echo "        cp -r -p /repos/${app_name}/. \"${app_dir}\""
799
+        echo "        cd \"${app_dir}\" || exit 36487365"
800
+    fi
801
+    echo '        git pull'
802
+    echo '    else'
803
+    if [ ! "$app_dir" ]; then
804
+        echo "        git_clone \"\$${app_name_upper}_REPO\" \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
805
+    else
806
+        echo "        git_clone \"\$${app_name_upper}_REPO\" \"${app_dir}\""
807
+    fi
808
+    echo '    fi'
809
+    echo ''
810
+    if [ ! "$app_dir" ]; then
811
+        echo "    if [ ! -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" ]; then"
812
+    else
813
+        echo "    if [ ! -d \"${app_dir}\" ]; then"
814
+    fi
815
+    echo "        echo \$'Unable to clone ${app_name} repo'"
816
+    echo '        exit 87525'
817
+    echo '    fi'
818
+    echo ''
775
 else
819
 else
776
-    echo "    if [ ! -d \"${app_dir}\" ]; then"
820
+    echo "    mkdir -p \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
821
+    if [ "$app_dir" ]; then
822
+        echo "    mkdir \"${app_dir}\""
823
+    fi
777
 fi
824
 fi
778
-echo "        echo \$'Unable to clone ${app_name} repo'"
779
-echo '        exit 87525'
780
-echo '    fi'
781
-echo ''
782
 if [ ! "$app_dir" ]; then
825
 if [ ! "$app_dir" ]; then
783
     echo "    cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 36587356"
826
     echo "    cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 36587356"
784
 else
827
 else
785
     echo "    cd \"${app_dir}\" || exit 3463754637"
828
     echo "    cd \"${app_dir}\" || exit 3463754637"
786
 fi
829
 fi
787
-echo "    git checkout \"\$${app_name_upper}_COMMIT\" -b \"\$${app_name_upper}_COMMIT\""
788
-echo "    set_completion_param \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\""
830
+if [ "$app_repo" ]; then
831
+    echo "    git checkout \"\$${app_name_upper}_COMMIT\" -b \"\$${app_name_upper}_COMMIT\""
832
+    echo "    set_completion_param \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\""
833
+fi
789
 if [ $app_webui ]; then
834
 if [ $app_webui ]; then
790
     echo ''
835
     echo ''
791
     echo "    chmod g+w \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
836
     echo "    chmod g+w \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
828
         echo ''
873
         echo ''
829
         echo "        { echo '  add_header Strict-Transport-Security max-age=15768000;';"
874
         echo "        { echo '  add_header Strict-Transport-Security max-age=15768000;';"
830
         echo "          echo '';"
875
         echo "          echo '';"
831
-        echo "          echo '  # Logs';"
832
-        echo "          echo '  access_log /dev/null;';"
833
-        echo "          echo '  error_log /dev/null;';"
876
+        echo "          echo '    access_log /dev/null;';"
877
+        echo "          echo '    error_log /dev/null;';"
834
         echo "          echo '';"
878
         echo "          echo '';"
835
-        echo "          echo '  # Root';"
836
-        echo "          echo \"  root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
879
+        echo "          echo \"    root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
837
         echo "          echo '';"
880
         echo "          echo '';"
838
         if [[ "$app_php" == 'yes' ]]; then
881
         if [[ "$app_php" == 'yes' ]]; then
839
             echo "          echo '  index index.php;';"
882
             echo "          echo '  index index.php;';"
875
     echo "    echo '' >> \"\$${app_name}_nginx_site\""
918
     echo "    echo '' >> \"\$${app_name}_nginx_site\""
876
     echo "    nginx_security_options \"\$${app_name_upper}_DOMAIN_NAME\""
919
     echo "    nginx_security_options \"\$${app_name_upper}_DOMAIN_NAME\""
877
     echo "    { echo '';"
920
     echo "    { echo '';"
878
-    echo "      echo '  # Logs';"
879
-    echo "      echo '  access_log /dev/null;';"
880
-    echo "      echo '  error_log /dev/null;';"
921
+    echo "      echo '    access_log /dev/null;';"
922
+    echo "      echo '    error_log /dev/null;';"
881
     echo "      echo '';"
923
     echo "      echo '';"
882
-    echo "      echo '  # Root';"
883
-    echo "      echo \"  root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
924
+    echo "      echo \"    root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
884
     echo "      echo '';"
925
     echo "      echo '';"
885
     if [[ "$app_php" == 'yes' ]]; then
926
     if [[ "$app_php" == 'yes' ]]; then
886
         echo "      echo '  index index.php;';"
927
         echo "      echo '  index index.php;';"
926
     echo "      echo 'Description=${app_name}';"
967
     echo "      echo 'Description=${app_name}';"
927
     echo "      echo 'After=syslog.target';"
968
     echo "      echo 'After=syslog.target';"
928
     echo "      echo 'After=network.target';"
969
     echo "      echo 'After=network.target';"
929
-    echo "      echo 'Documentation=${app_name_upper}_REPO";
970
+    echo "      echo \"Documentation=\$${app_name_upper}_REPO\";";
930
     echo "      echo '';"
971
     echo "      echo '';"
931
     echo "      echo '[Service]';"
972
     echo "      echo '[Service]';"
932
     echo "      echo 'Type=simple';"
973
     echo "      echo 'Type=simple';"

+ 1
- 4
src/freedombone-utils-dns 查看文件

229
           echo '}'; } > "${INADYN_CONFIG_FILE}"
229
           echo '}'; } > "${INADYN_CONFIG_FILE}"
230
     fi
230
     fi
231
 
231
 
232
-    if ! grep -q "$CURRENT_DDNS_DOMAIN" "${INADYN_CONFIG_FILE}"; then
233
-        DDNS_HOSTNAMES=$(grep 'hostname ' "${INADYN_CONFIG_FILE}"| awk -F '{' '{print $2}' | sed 's| }||g')
234
-        sed -i "s|hostname .*|hostname       = {${DDNS_HOSTNAMES}, ${CURRENT_DDNS_DOMAIN} }|g" "${INADYN_CONFIG_FILE}"
235
-    fi
232
+    sed -i "s|hostname .*|hostname       = $DEFAULT_DOMAIN_NAME"
236
     chmod 600 "${INADYN_CONFIG_FILE}"
233
     chmod 600 "${INADYN_CONFIG_FILE}"
237
 
234
 
238
     systemctl daemon-reload
235
     systemctl daemon-reload

+ 2
- 14
src/freedombone-utils-web 查看文件

449
     read_config_param DEFAULT_DOMAIN_NAME
449
     read_config_param DEFAULT_DOMAIN_NAME
450
 
450
 
451
     grep "alias " "${INADYN_CONFIG_FILE}" | sed 's| alias ||g' > ~/.inadyn_existing_sites
451
     grep "alias " "${INADYN_CONFIG_FILE}" | sed 's| alias ||g' > ~/.inadyn_existing_sites
452
-    DDNS_HOSTNAMES=
453
-    while read -r host; do
454
-        if [ "$DDNS_HOSTNAMES" ]; then
455
-            DDNS_HOSTNAMES="$DDNS_HOSTNAMES, $host"
456
-        else
457
-            DDNS_HOSTNAMES="$host"
458
-        fi
459
-    done <~/.inadyn_existing_sites
460
-
461
-    if [ ! "$DDNS_HOSTNAMES" ]; then
462
-        return
463
-    fi
464
 
452
 
465
     if [[ "$DDNS_PROVIDER" == "default@freedns.afraid.org" ]]; then
453
     if [[ "$DDNS_PROVIDER" == "default@freedns.afraid.org" ]]; then
466
         DDNS_PROVIDER='freedns'
454
         DDNS_PROVIDER='freedns'
525
     # https version 1.99.8
513
     # https version 1.99.8
526
 
514
 
527
     apt-get -yq install build-essential curl libgnutls28-dev automake1.11
515
     apt-get -yq install build-essential curl libgnutls28-dev automake1.11
528
-    apt-get -yq install gnutls-dev libconfuse-dev pkg-config libssl-dev
516
+    apt-get -yq install gnutls-dev libconfuse-dev pkg-config
529
 
517
 
530
     if [ ! -d "$INSTALL_DIR/inadyn" ]; then
518
     if [ ! -d "$INSTALL_DIR/inadyn" ]; then
531
         if [ -d /repos/inadyn ]; then
519
         if [ -d /repos/inadyn ]; then
548
 
536
 
549
     ./autogen.sh
537
     ./autogen.sh
550
 
538
 
551
-    if ! ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-openssl; then
539
+    if ! ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var; then
552
         exit 74890
540
         exit 74890
553
     fi
541
     fi
554
     if ! make -j5; then
542
     if ! make -j5; then

+ 149
- 65
website/EN/devguide.html 查看文件

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
-<title></title>
7
-<!-- 2018-04-12 Thu 18:23 -->
8
-<meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
9
-<meta  name="generator" content="Org-mode" />
10
-<meta  name="author" content="Bob Mottram" />
11
-<meta  name="description" content="Freedombone developers guide"
6
+<!-- 2018-05-14 Mon 19:43 -->
7
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
+<meta name="viewport" content="width=device-width, initial-scale=1" />
9
+<title>&lrm;</title>
10
+<meta name="generator" content="Org mode" />
11
+<meta name="author" content="Bob Mottram" />
12
+<meta name="description" content="Freedombone developers guide"
12
  />
13
  />
13
-<meta  name="keywords" content="freedombone, developers" />
14
+<meta name="keywords" content="freedombone, developers" />
14
 <style type="text/css">
15
 <style type="text/css">
15
  <!--/*--><![CDATA[/*><!--*/
16
  <!--/*--><![CDATA[/*><!--*/
16
-  .title  { text-align: center; }
17
+  .title  { text-align: center;
18
+             margin-bottom: .2em; }
19
+  .subtitle { text-align: center;
20
+              font-size: medium;
21
+              font-weight: bold;
22
+              margin-top:0; }
17
   .todo   { font-family: monospace; color: red; }
23
   .todo   { font-family: monospace; color: red; }
18
-  .done   { color: green; }
24
+  .done   { font-family: monospace; color: green; }
25
+  .priority { font-family: monospace; color: orange; }
19
   .tag    { background-color: #eee; font-family: monospace;
26
   .tag    { background-color: #eee; font-family: monospace;
20
             padding: 2px; font-size: 80%; font-weight: normal; }
27
             padding: 2px; font-size: 80%; font-weight: normal; }
21
   .timestamp { color: #bebebe; }
28
   .timestamp { color: #bebebe; }
22
   .timestamp-kwd { color: #5f9ea0; }
29
   .timestamp-kwd { color: #5f9ea0; }
23
-  .right  { margin-left: auto; margin-right: 0px;  text-align: right; }
24
-  .left   { margin-left: 0px;  margin-right: auto; text-align: left; }
25
-  .center { margin-left: auto; margin-right: auto; text-align: center; }
30
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
31
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
32
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
26
   .underline { text-decoration: underline; }
33
   .underline { text-decoration: underline; }
27
   #postamble p, #preamble p { font-size: 90%; margin: .2em; }
34
   #postamble p, #preamble p { font-size: 90%; margin: .2em; }
28
   p.verse { margin-left: 3%; }
35
   p.verse { margin-left: 3%; }
49
     border: 1px solid black;
56
     border: 1px solid black;
50
   }
57
   }
51
   pre.src:hover:before { display: inline;}
58
   pre.src:hover:before { display: inline;}
52
-  pre.src-sh:before    { content: 'sh'; }
53
-  pre.src-bash:before  { content: 'sh'; }
59
+  /* Languages per Org manual */
60
+  pre.src-asymptote:before { content: 'Asymptote'; }
61
+  pre.src-awk:before { content: 'Awk'; }
62
+  pre.src-C:before { content: 'C'; }
63
+  /* pre.src-C++ doesn't work in CSS */
64
+  pre.src-clojure:before { content: 'Clojure'; }
65
+  pre.src-css:before { content: 'CSS'; }
66
+  pre.src-D:before { content: 'D'; }
67
+  pre.src-ditaa:before { content: 'ditaa'; }
68
+  pre.src-dot:before { content: 'Graphviz'; }
69
+  pre.src-calc:before { content: 'Emacs Calc'; }
54
   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
70
   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
55
-  pre.src-R:before     { content: 'R'; }
56
-  pre.src-perl:before  { content: 'Perl'; }
57
-  pre.src-java:before  { content: 'Java'; }
58
-  pre.src-sql:before   { content: 'SQL'; }
71
+  pre.src-fortran:before { content: 'Fortran'; }
72
+  pre.src-gnuplot:before { content: 'gnuplot'; }
73
+  pre.src-haskell:before { content: 'Haskell'; }
74
+  pre.src-hledger:before { content: 'hledger'; }
75
+  pre.src-java:before { content: 'Java'; }
76
+  pre.src-js:before { content: 'Javascript'; }
77
+  pre.src-latex:before { content: 'LaTeX'; }
78
+  pre.src-ledger:before { content: 'Ledger'; }
79
+  pre.src-lisp:before { content: 'Lisp'; }
80
+  pre.src-lilypond:before { content: 'Lilypond'; }
81
+  pre.src-lua:before { content: 'Lua'; }
82
+  pre.src-matlab:before { content: 'MATLAB'; }
83
+  pre.src-mscgen:before { content: 'Mscgen'; }
84
+  pre.src-ocaml:before { content: 'Objective Caml'; }
85
+  pre.src-octave:before { content: 'Octave'; }
86
+  pre.src-org:before { content: 'Org mode'; }
87
+  pre.src-oz:before { content: 'OZ'; }
88
+  pre.src-plantuml:before { content: 'Plantuml'; }
89
+  pre.src-processing:before { content: 'Processing.js'; }
90
+  pre.src-python:before { content: 'Python'; }
91
+  pre.src-R:before { content: 'R'; }
92
+  pre.src-ruby:before { content: 'Ruby'; }
93
+  pre.src-sass:before { content: 'Sass'; }
94
+  pre.src-scheme:before { content: 'Scheme'; }
95
+  pre.src-screen:before { content: 'Gnu Screen'; }
96
+  pre.src-sed:before { content: 'Sed'; }
97
+  pre.src-sh:before { content: 'shell'; }
98
+  pre.src-sql:before { content: 'SQL'; }
99
+  pre.src-sqlite:before { content: 'SQLite'; }
100
+  /* additional languages in org.el's org-babel-load-languages alist */
101
+  pre.src-forth:before { content: 'Forth'; }
102
+  pre.src-io:before { content: 'IO'; }
103
+  pre.src-J:before { content: 'J'; }
104
+  pre.src-makefile:before { content: 'Makefile'; }
105
+  pre.src-maxima:before { content: 'Maxima'; }
106
+  pre.src-perl:before { content: 'Perl'; }
107
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
108
+  pre.src-scala:before { content: 'Scala'; }
109
+  pre.src-shell:before { content: 'Shell Script'; }
110
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
111
+  /* additional language identifiers per "defun org-babel-execute"
112
+       in ob-*.el */
113
+  pre.src-cpp:before  { content: 'C++'; }
114
+  pre.src-abc:before  { content: 'ABC'; }
115
+  pre.src-coq:before  { content: 'Coq'; }
116
+  pre.src-groovy:before  { content: 'Groovy'; }
117
+  /* additional language identifiers from org-babel-shell-names in
118
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
119
+     the execution function name together. */
120
+  pre.src-bash:before  { content: 'bash'; }
121
+  pre.src-csh:before  { content: 'csh'; }
122
+  pre.src-ash:before  { content: 'ash'; }
123
+  pre.src-dash:before  { content: 'dash'; }
124
+  pre.src-ksh:before  { content: 'ksh'; }
125
+  pre.src-mksh:before  { content: 'mksh'; }
126
+  pre.src-posh:before  { content: 'posh'; }
127
+  /* Additional Emacs modes also supported by the LaTeX listings package */
128
+  pre.src-ada:before { content: 'Ada'; }
129
+  pre.src-asm:before { content: 'Assembler'; }
130
+  pre.src-caml:before { content: 'Caml'; }
131
+  pre.src-delphi:before { content: 'Delphi'; }
132
+  pre.src-html:before { content: 'HTML'; }
133
+  pre.src-idl:before { content: 'IDL'; }
134
+  pre.src-mercury:before { content: 'Mercury'; }
135
+  pre.src-metapost:before { content: 'MetaPost'; }
136
+  pre.src-modula-2:before { content: 'Modula-2'; }
137
+  pre.src-pascal:before { content: 'Pascal'; }
138
+  pre.src-ps:before { content: 'PostScript'; }
139
+  pre.src-prolog:before { content: 'Prolog'; }
140
+  pre.src-simula:before { content: 'Simula'; }
141
+  pre.src-tcl:before { content: 'tcl'; }
142
+  pre.src-tex:before { content: 'TeX'; }
143
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
144
+  pre.src-verilog:before { content: 'Verilog'; }
145
+  pre.src-vhdl:before { content: 'VHDL'; }
146
+  pre.src-xml:before { content: 'XML'; }
147
+  pre.src-nxml:before { content: 'XML'; }
148
+  /* add a generic configuration mode; LaTeX export needs an additional
149
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
150
+  pre.src-conf:before { content: 'Configuration File'; }
59
 
151
 
60
   table { border-collapse:collapse; }
152
   table { border-collapse:collapse; }
61
   caption.t-above { caption-side: top; }
153
   caption.t-above { caption-side: top; }
62
   caption.t-bottom { caption-side: bottom; }
154
   caption.t-bottom { caption-side: bottom; }
63
   td, th { vertical-align:top;  }
155
   td, th { vertical-align:top;  }
64
-  th.right  { text-align: center;  }
65
-  th.left   { text-align: center;   }
66
-  th.center { text-align: center; }
67
-  td.right  { text-align: right;  }
68
-  td.left   { text-align: left;   }
69
-  td.center { text-align: center; }
156
+  th.org-right  { text-align: center;  }
157
+  th.org-left   { text-align: center;   }
158
+  th.org-center { text-align: center; }
159
+  td.org-right  { text-align: right;  }
160
+  td.org-left   { text-align: left;   }
161
+  td.org-center { text-align: center; }
70
   dt { font-weight: bold; }
162
   dt { font-weight: bold; }
71
-  .footpara:nth-child(2) { display: inline; }
72
-  .footpara { display: block; }
163
+  .footpara { display: inline; }
73
   .footdef  { margin-bottom: 1em; }
164
   .footdef  { margin-bottom: 1em; }
74
   .figure { padding: 1em; }
165
   .figure { padding: 1em; }
75
   .figure p { text-align: center; }
166
   .figure p { text-align: center; }
89
     { font-size: 10px; font-weight: bold; white-space: nowrap; }
180
     { font-size: 10px; font-weight: bold; white-space: nowrap; }
90
   .org-info-js_search-highlight
181
   .org-info-js_search-highlight
91
     { background-color: #ffff00; color: #000000; font-weight: bold; }
182
     { background-color: #ffff00; color: #000000; font-weight: bold; }
183
+  .org-svg { width: 90%; }
92
   /*]]>*/-->
184
   /*]]>*/-->
93
 </style>
185
 </style>
94
 <link rel="stylesheet" type="text/css" href="freedombone.css" />
186
 <link rel="stylesheet" type="text/css" href="freedombone.css" />
97
 @licstart  The following is the entire license notice for the
189
 @licstart  The following is the entire license notice for the
98
 JavaScript code in this tag.
190
 JavaScript code in this tag.
99
 
191
 
100
-Copyright (C) 2012-2013 Free Software Foundation, Inc.
192
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
101
 
193
 
102
 The JavaScript code in this tag is free software: you can
194
 The JavaScript code in this tag is free software: you can
103
 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
144
 <a name="top" id="top"></a>
236
 <a name="top" id="top"></a>
145
 </div>
237
 </div>
146
 <div id="content">
238
 <div id="content">
147
-<h1 class="title"></h1>
148
 
239
 
149
 <div class="figure">
240
 <div class="figure">
150
 <p><img src="images/logo.png" alt="logo.png" width="80%" height="10%" align="center" />
241
 <p><img src="images/logo.png" alt="logo.png" width="80%" height="10%" align="center" />
151
 </p>
242
 </p>
152
 </div>
243
 </div>
153
 
244
 
154
-<div id="outline-container-sec-1" class="outline-2">
155
-<h2 id="sec-1">Developers Guide</h2>
245
+<div id="outline-container-orgd0bf853" class="outline-2">
246
+<h2 id="orgd0bf853">Developers Guide</h2>
156
 </div>
247
 </div>
157
 
248
 
158
-<div id="outline-container-sec-2" class="outline-2">
159
-<h2 id="sec-2">Introduction</h2>
160
-<div class="outline-text-2" id="text-2">
249
+<div id="outline-container-orgaedd476" class="outline-2">
250
+<h2 id="orgaedd476">Introduction</h2>
251
+<div class="outline-text-2" id="text-orgaedd476">
161
 <p>
252
 <p>
162
 Freedombone consists of a set of bash scripts. There are a lot of them, but they're not very complicated. If you're familiar with the GNU/Linux commandline and can hack a bash script then you can probably add a new app or fix a bug in the system. There are no trendy development frameworks to learn or to get in your way. You might also want to consult the <a href="./codeofconduct.html">Code of Conduct</a>, and there is a Matrix room at <b>#fbone:matrix.freedombone.net</b>
253
 Freedombone consists of a set of bash scripts. There are a lot of them, but they're not very complicated. If you're familiar with the GNU/Linux commandline and can hack a bash script then you can probably add a new app or fix a bug in the system. There are no trendy development frameworks to learn or to get in your way. You might also want to consult the <a href="./codeofconduct.html">Code of Conduct</a>, and there is a Matrix room at <b>#fbone:matrix.freedombone.net</b>
163
 </p>
254
 </p>
164
 </div>
255
 </div>
165
 </div>
256
 </div>
166
-<div id="outline-container-sec-3" class="outline-2">
167
-<h2 id="sec-3">Adding extra apps</h2>
168
-<div class="outline-text-2" id="text-3">
257
+<div id="outline-container-org3e1ecd6" class="outline-2">
258
+<h2 id="org3e1ecd6">Adding extra apps</h2>
259
+<div class="outline-text-2" id="text-org3e1ecd6">
169
 <p>
260
 <p>
170
 Suppose you have some internet application which you want to add to the system. To do this you need to create an app script which tells the system how to install/remove and also backup/restore. The script should be designed to work with the current stable version of Debian.
261
 Suppose you have some internet application which you want to add to the system. To do this you need to create an app script which tells the system how to install/remove and also backup/restore. The script should be designed to work with the current stable version of Debian.
171
 </p>
262
 </p>
175
 </p>
266
 </p>
176
 
267
 
177
 <p>
268
 <p>
178
-To create a script for a generic PHP plus MySql/MariaDB web app:
269
+To create a script for a generic PHP plus MySql/MariaDB web app with a couple of extra packages:
179
 </p>
270
 </p>
180
 
271
 
181
 <div class="org-src-container">
272
 <div class="org-src-container">
182
-
183
-<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
184
-                     -c [commit] --php yes -d mariadb &gt; \
273
+<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
274
+                     --packages <span class="org-string">"cowsay libssl-dev"</span> <span class="org-sh-escaped-newline">\</span>
275
+                     -c [commit] --php yes -d mariadb &gt; <span class="org-sh-escaped-newline">\</span>
185
                      src/freedombone-app-myappname
276
                      src/freedombone-app-myappname
186
 </pre>
277
 </pre>
187
 </div>
278
 </div>
191
 </p>
282
 </p>
192
 
283
 
193
 <div class="org-src-container">
284
 <div class="org-src-container">
194
-
195
-<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
196
-                     -c [commit] --node yes -d mariadb \
197
-                     --dir /etc/myappname --daemon yes &gt; \
285
+<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
286
+                     -c [commit] --node yes -d mariadb <span class="org-sh-escaped-newline">\</span>
287
+                     --dir /etc/myappname --daemon yes &gt; <span class="org-sh-escaped-newline">\</span>
198
                      src/freedombone-app-myappname
288
                      src/freedombone-app-myappname
199
 </pre>
289
 </pre>
200
 </div>
290
 </div>
204
 </p>
294
 </p>
205
 
295
 
206
 <div class="org-src-container">
296
 <div class="org-src-container">
207
-
208
-<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
209
-                     -c [commit] -d postgresql \
210
-                     --dir /etc/myappname --daemon yes &gt; \
297
+<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
298
+                     -c [commit] -d postgresql <span class="org-sh-escaped-newline">\</span>
299
+                     --dir /etc/myappname --daemon yes &gt; <span class="org-sh-escaped-newline">\</span>
211
                      src/freedombone-app-myappname
300
                      src/freedombone-app-myappname
212
 </pre>
301
 </pre>
213
 </div>
302
 </div>
217
 </p>
306
 </p>
218
 
307
 
219
 <div class="org-src-container">
308
 <div class="org-src-container">
220
-
221
-<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
222
-                     -c [commit] --dir /etc/myappname \
223
-                     --daemon yes --portinternal 1234 &gt; \
309
+<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
310
+                     -c [commit] --dir /etc/myappname <span class="org-sh-escaped-newline">\</span>
311
+                     --daemon yes --portinternal 1234 &gt; <span class="org-sh-escaped-newline">\</span>
224
                      src/freedombone-app-myappname
312
                      src/freedombone-app-myappname
225
 </pre>
313
 </pre>
226
 </div>
314
 </div>
230
 </p>
318
 </p>
231
 
319
 
232
 <div class="org-src-container">
320
 <div class="org-src-container">
233
-
234
-<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
235
-                     -c [commit] --dir /etc/myappname \
236
-                     --daemon yes --port 5000 &gt; \
321
+<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
322
+                     -c [commit] --dir /etc/myappname <span class="org-sh-escaped-newline">\</span>
323
+                     --daemon yes --port 5000 &gt; <span class="org-sh-escaped-newline">\</span>
237
                      src/freedombone-app-myappname
324
                      src/freedombone-app-myappname
238
 </pre>
325
 </pre>
239
 </div>
326
 </div>
243
 </p>
330
 </p>
244
 
331
 
245
 <div class="org-src-container">
332
 <div class="org-src-container">
246
-
247
-<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
248
-                     -c [commit] --php yes -d mariadb \
249
-                     --onion yes &gt; \
333
+<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
334
+                     -c [commit] --php yes -d mariadb <span class="org-sh-escaped-newline">\</span>
335
+                     --onion yes &gt; <span class="org-sh-escaped-newline">\</span>
250
                      src/freedombone-app-myappname
336
                      src/freedombone-app-myappname
251
 </pre>
337
 </pre>
252
 </div>
338
 </div>
256
 </p>
342
 </p>
257
 
343
 
258
 <div class="org-src-container">
344
 <div class="org-src-container">
259
-
260
 <pre class="src src-bash">man freedombone-template
345
 <pre class="src src-bash">man freedombone-template
261
 </pre>
346
 </pre>
262
 </div>
347
 </div>
270
 </p>
355
 </p>
271
 
356
 
272
 <div class="org-src-container">
357
 <div class="org-src-container">
273
-
274
 <pre class="src src-bash">make install
358
 <pre class="src src-bash">make install
275
 </pre>
359
 </pre>
276
 </div>
360
 </div>
285
 </div>
369
 </div>
286
 </div>
370
 </div>
287
 
371
 
288
-<div id="outline-container-sec-4" class="outline-2">
289
-<h2 id="sec-4">Customising mesh images</h2>
290
-<div class="outline-text-2" id="text-4">
372
+<div id="outline-container-org2b37622" class="outline-2">
373
+<h2 id="org2b37622">Customising mesh images</h2>
374
+<div class="outline-text-2" id="text-org2b37622">
291
 <p>
375
 <p>
292
 If you want to make your own specially branded version of the mesh images, such as for a particular event, then to change the default desktop backgrounds edit the images within <b>img/backgrounds</b> and to change the available avatars and desktop icons edit the images within <b>img/avatars</b>. Re-create disk images using the instructions shown previously.
376
 If you want to make your own specially branded version of the mesh images, such as for a particular event, then to change the default desktop backgrounds edit the images within <b>img/backgrounds</b> and to change the available avatars and desktop icons edit the images within <b>img/avatars</b>. Re-create disk images using the instructions shown previously.
293
 </p>
377
 </p>