@drumee/setup-infra 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-local-certs +38 -0
- package/bin/env +8 -5
- package/bin/init-acme +23 -4
- package/bin/init-named +1 -1
- package/bin/install +28 -4
- package/bin/prosody +21 -12
- package/index.js +314 -184
- package/package.json +2 -2
- package/templates/etc/bind/named.conf.local +39 -0
- package/templates/etc/bind/named.conf.options +13 -4
- package/templates/etc/dhcp/dhclient.conf +55 -0
- package/templates/etc/drumee/certs/jitsi.private.cnf +13 -0
- package/templates/etc/drumee/certs/private.cnf +13 -0
- package/templates/etc/drumee/conf.d/conference.private.json +9 -0
- package/templates/etc/drumee/conf.d/conference.public.json +9 -0
- package/templates/etc/drumee/conf.d/myDrumee.json.tpl +2 -1
- package/templates/etc/drumee/drumee.sh.tpl +32 -17
- package/templates/etc/drumee/infrastructure/internals/accel.private.conf.tpl +47 -0
- package/templates/etc/drumee/infrastructure/internals/{accel.conf.tpl → accel.public.conf.tpl} +1 -1
- package/templates/etc/drumee/infrastructure/{platform.json.tpl → mfs.private.conf.tpl} +5 -5
- package/templates/etc/drumee/infrastructure/{mfs.conf.tpl → mfs.public.conf.tpl} +1 -1
- package/templates/etc/drumee/infrastructure/routes/private.conf.tpl +143 -0
- package/templates/etc/drumee/infrastructure/routes/{main.conf.tpl → public.conf.tpl} +18 -28
- package/templates/etc/drumee/infrastructure/servers/tt.conf +9 -9
- package/templates/etc/drumee/ssl/private.conf.tpl +2 -1
- package/templates/etc/drumee/ssl/public.conf.tpl +1 -1
- package/templates/etc/jitsi/jicofo/jicofo.private.conf.tpl +46 -0
- package/templates/etc/jitsi/jicofo/{jicofo.conf.tpl → jicofo.public.conf.tpl} +7 -7
- package/templates/etc/jitsi/jicofo/sip-cmmunicator.private.properties +3 -0
- package/templates/etc/jitsi/jicofo/sip-cmmunicator.public.properties +3 -0
- package/templates/etc/jitsi/meet.private.conf.tpl +132 -0
- package/templates/etc/jitsi/{meet.conf.tpl → meet.public.conf.tpl} +5 -5
- package/templates/etc/jitsi/ssl.private.conf.tpl +25 -0
- package/templates/etc/jitsi/{ssl.conf.tpl → ssl.public.conf.tpl} +3 -3
- package/templates/etc/jitsi/videobridge/defaults/jvb.conf +1 -1
- package/templates/etc/jitsi/videobridge/jvb.private.conf +67 -0
- package/templates/etc/jitsi/videobridge/{jvb.conf → jvb.public.conf} +6 -6
- package/templates/etc/jitsi/web/config.private.js.tpl +208 -0
- package/templates/etc/jitsi/web/{config.js.tpl → config.public.js.tpl} +4 -4
- package/templates/etc/jitsi/web/defaults/default +2 -2
- package/templates/etc/jitsi/web/defaults/meet.conf +3 -3
- package/templates/etc/mysql/mariadb.conf.d/50-server.cnf +3 -3
- package/templates/etc/nginx/modules-enabled/{90-turn-relay.conf → 90-turn-relay.private.conf.tpl} +6 -6
- package/templates/etc/nginx/modules-enabled/{90-turn-relay.conf.tpl → 90-turn-relay.public.conf.tpl} +4 -4
- package/templates/etc/nginx/nginx.conf +2 -0
- package/templates/etc/nginx/sites-enabled/{public.conf.tpl → 01-public.conf.tpl} +7 -7
- package/templates/etc/nginx/sites-enabled/{private.conf.tpl → 02-private.conf.tpl} +6 -6
- package/templates/etc/nginx/sites-enabled/{jitsi.conf.tpl → 20-jitsi.private.conf.tpl} +9 -9
- package/templates/etc/nginx/sites-enabled/{pivate.jitsi.conf.tpl → 20-jitsi.public.conf.tpl} +9 -9
- package/templates/etc/nginx/sites-enabled/{localhost.conf → loopback.tpl} +10 -9
- package/templates/etc/nginx/sites-enabled/turnrelay.conf.tpl +4 -4
- package/templates/etc/prosody/conf.d/private.cfg.lua.tpl +51 -51
- package/templates/etc/prosody/conf.d/public.cfg.lua.tpl +47 -47
- package/templates/etc/prosody/defaults/conf.d/jitsi-meet.cfg.lua +3 -3
- package/templates/etc/turnserver.private.conf.tpl +46 -0
- package/templates/etc/{turnserver.conf.tpl → turnserver.public.conf.tpl} +3 -3
- package/templates/index.js +3 -2
- package/templates/utils.js +22 -99
- package/templates/var/lib/bind/domain.tpl +70 -0
- package/templates/var/lib/bind/private-reverse.tpl +1 -1
- package/templates/var/lib/bind/{prvate.tpl → private.tpl} +1 -10
- package/templates/var/lib/bind/public-reverse.tpl +7 -7
- package/templates/var/lib/bind/public.tpl +7 -7
- package/bin/init-private +0 -40
- package/bin/set-jitsi-conf +0 -14
- package/template.js +0 -453
- package/templates/etc/bind/named.conf.private +0 -21
- package/templates/etc/bind/named.conf.public +0 -21
- package/templates/etc/drumee/conf.d/conference.json.tpl +0 -9
- package/templates/etc/drumee/dnsapi.sh.tpl +0 -28
- package/templates/etc/drumee/env.json +0 -29
- package/templates/etc/jitsi/jicofo/sip-cmmunicator.properties +0 -3
- package/templates/etc/nginx/sites-enabled/public.jitsi.conf.tpl +0 -28
- package/templates/etc/prosody/conf.d/vhost.cfg.lua.tpl +0 -162
- package/thidima.sh +0 -44
package/templates/utils.js
CHANGED
|
@@ -1,41 +1,12 @@
|
|
|
1
1
|
const argparse = require("argparse");
|
|
2
2
|
const { existsSync } = require("fs");
|
|
3
3
|
const { readFileSync } = require(`jsonfile`);
|
|
4
|
-
const {
|
|
5
|
-
BACKUP_STORAGE,
|
|
6
|
-
DRUMEE_DATA_DIR,
|
|
7
|
-
DRUMEE_DB_DIR,
|
|
8
|
-
MAX_BODY_SIZE,
|
|
9
|
-
PRIVATE_DOMAIN,
|
|
10
|
-
PRIVATE_IP4,
|
|
11
|
-
PUBLIC_DOMAIN,
|
|
12
|
-
PUBLIC_IP4,
|
|
13
|
-
PUBLIC_IP6,
|
|
14
|
-
DRUMEE_ROOT,
|
|
15
|
-
HTTP_PORT,
|
|
16
|
-
HTTPS_PORT,
|
|
17
|
-
FORCE_INSTALL,
|
|
18
|
-
ADMIN_EMAIL,
|
|
19
|
-
DRUMEE_DESCRIPTION
|
|
20
|
-
} = process.env;
|
|
21
4
|
|
|
22
5
|
const parser = new argparse.ArgumentParser({
|
|
23
6
|
description: "Drumee Infrastructure Helper",
|
|
24
7
|
add_help: true,
|
|
25
8
|
});
|
|
26
9
|
|
|
27
|
-
parser.add_argument("--admin_email", {
|
|
28
|
-
type: String,
|
|
29
|
-
default: ADMIN_EMAIL || "admin@localhost",
|
|
30
|
-
help: "Drumee Instance Admin User Email",
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
parser.add_argument("--description", {
|
|
34
|
-
type: String,
|
|
35
|
-
default: DRUMEE_DESCRIPTION || "My Drumee Team Server",
|
|
36
|
-
help: "Drumee Instance Description",
|
|
37
|
-
});
|
|
38
|
-
|
|
39
10
|
parser.add_argument("--readonly", {
|
|
40
11
|
type: "int",
|
|
41
12
|
default: 0,
|
|
@@ -44,61 +15,61 @@ parser.add_argument("--readonly", {
|
|
|
44
15
|
|
|
45
16
|
parser.add_argument("--chroot", {
|
|
46
17
|
type: String,
|
|
47
|
-
default:
|
|
18
|
+
default: null,
|
|
48
19
|
help: "Output root. Defaulted to /",
|
|
49
20
|
});
|
|
50
21
|
|
|
51
|
-
parser.add_argument("--
|
|
52
|
-
type:
|
|
53
|
-
default:
|
|
22
|
+
parser.add_argument("--force-install", {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 0,
|
|
54
25
|
help: "Override existing configs",
|
|
55
26
|
});
|
|
56
27
|
|
|
57
28
|
parser.add_argument("--outdir", {
|
|
58
29
|
type: String,
|
|
59
|
-
default:
|
|
30
|
+
default: null,
|
|
60
31
|
help: "If set, takes precedent on chroot. Output root. Defaulted to /",
|
|
61
32
|
});
|
|
62
33
|
|
|
63
34
|
parser.add_argument("--public-domain", {
|
|
64
35
|
type: String,
|
|
65
|
-
default:
|
|
36
|
+
default: null,
|
|
66
37
|
help: "Public domain name",
|
|
67
38
|
});
|
|
68
39
|
|
|
69
40
|
parser.add_argument("--private-domain", {
|
|
70
41
|
type: String,
|
|
71
|
-
default:
|
|
42
|
+
default: null,
|
|
72
43
|
help: "Private domain name",
|
|
73
44
|
});
|
|
74
45
|
|
|
75
|
-
parser.add_argument("--local-domain", {
|
|
76
|
-
type: String,
|
|
77
|
-
default: PRIVATE_DOMAIN,
|
|
78
|
-
help: "",
|
|
79
|
-
});
|
|
80
|
-
|
|
81
46
|
parser.add_argument("--public-ip4", {
|
|
82
47
|
type: String,
|
|
83
|
-
default:
|
|
48
|
+
default: null,
|
|
84
49
|
help: "Public IPV4",
|
|
85
50
|
});
|
|
86
51
|
|
|
87
52
|
parser.add_argument("--public-ip6", {
|
|
88
53
|
type: String,
|
|
89
|
-
default:
|
|
54
|
+
default: null,
|
|
90
55
|
help: "Public IPV6",
|
|
91
56
|
});
|
|
92
57
|
|
|
93
58
|
parser.add_argument("--private-ip4", {
|
|
94
59
|
type: String,
|
|
95
|
-
default:
|
|
60
|
+
default: null,
|
|
96
61
|
help: "Private IPV4",
|
|
97
62
|
});
|
|
98
63
|
|
|
64
|
+
parser.add_argument("--private-ip6", {
|
|
65
|
+
type: String,
|
|
66
|
+
default: null,
|
|
67
|
+
help: "Private IPV6",
|
|
68
|
+
});
|
|
69
|
+
|
|
99
70
|
parser.add_argument("--envfile", {
|
|
100
71
|
type: String,
|
|
101
|
-
help: "
|
|
72
|
+
help: "Data set required to install Drumee",
|
|
102
73
|
});
|
|
103
74
|
|
|
104
75
|
parser.add_argument("--only-infra", {
|
|
@@ -107,61 +78,12 @@ parser.add_argument("--only-infra", {
|
|
|
107
78
|
help: "If set, write only configs related to infra. Same as no-jitsi",
|
|
108
79
|
});
|
|
109
80
|
|
|
110
|
-
parser.add_argument("--localhost", {
|
|
111
|
-
type: "int",
|
|
112
|
-
default: 0,
|
|
113
|
-
help: "If set, write minimal configs, no jitsi, no bind",
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
parser.add_argument("--http-port", {
|
|
117
|
-
type: "int",
|
|
118
|
-
default: HTTP_PORT || 80,
|
|
119
|
-
help: "If set, write minimal configs, no jitsi, no bind",
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
parser.add_argument("--https-port", {
|
|
123
|
-
type: "int",
|
|
124
|
-
default: HTTPS_PORT || 443,
|
|
125
|
-
help: "If set, write minimal configs, no jitsi, no bind",
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
parser.add_argument("--data-dir", {
|
|
129
|
-
type: String,
|
|
130
|
-
default: DRUMEE_DATA_DIR || "/var/lib/drumee/data",
|
|
131
|
-
help: "Partition or directory dedicated to store drumee data",
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
parser.add_argument("--db-dir", {
|
|
135
|
-
type: String,
|
|
136
|
-
default: DRUMEE_DB_DIR || "/var/lib/mysql",
|
|
137
|
-
help: "Partition or directory dedicated to store drumee database",
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
parser.add_argument("--drumee-root", {
|
|
141
|
-
type: String,
|
|
142
|
-
default: DRUMEE_ROOT || "/var/lib/drumee",
|
|
143
|
-
help: "Drumee main base",
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
|
|
147
81
|
parser.add_argument("--no-jitsi", {
|
|
148
82
|
type: "int",
|
|
149
83
|
default: 0,
|
|
150
84
|
help: "If set, won't write configs related to jisit. Same as only-infra",
|
|
151
85
|
});
|
|
152
86
|
|
|
153
|
-
parser.add_argument("--max-body-size", {
|
|
154
|
-
type: String,
|
|
155
|
-
default: MAX_BODY_SIZE || '10G',
|
|
156
|
-
help: "If set, won't write configs related to jisit. Same as only-infra",
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
parser.add_argument("--backup-storage", {
|
|
160
|
-
type: String,
|
|
161
|
-
default: BACKUP_STORAGE || '10G',
|
|
162
|
-
help: "If set, the partition or directiry will used to backup Drumee data",
|
|
163
|
-
});
|
|
164
|
-
|
|
165
87
|
const args = parser.parse_args();
|
|
166
88
|
|
|
167
89
|
/**
|
|
@@ -171,9 +93,10 @@ function hasExistingSettings(envfile = '/etc/drumee/drumee.json') {
|
|
|
171
93
|
if (!existsSync(envfile)) return false;
|
|
172
94
|
const { domain_name } = readFileSync(envfile);
|
|
173
95
|
if (!domain_name) return false;
|
|
174
|
-
|
|
96
|
+
const override = process.env.FORCE_INSTALL || args.force_install;
|
|
97
|
+
if (override) {
|
|
175
98
|
console.log(
|
|
176
|
-
`There is already a Drumee instance installed on this server but you selected
|
|
99
|
+
`There is already a Drumee instance installed on this server but you selected FORCE_INSTALL\n`,
|
|
177
100
|
`ALL EXISTING DATA related to ${domain_name} WILL BE LOST\n`,
|
|
178
101
|
);
|
|
179
102
|
return false;
|
|
@@ -181,7 +104,7 @@ function hasExistingSettings(envfile = '/etc/drumee/drumee.json') {
|
|
|
181
104
|
console.log(
|
|
182
105
|
`There is already a Drumee instance installed on this server\n`,
|
|
183
106
|
`domain name = ${domain_name}\n`,
|
|
184
|
-
`Use --
|
|
107
|
+
`Use --force-install or export FORCE_INSTALL=1\n`,
|
|
185
108
|
`********************************************\n`,
|
|
186
109
|
`* WARNING : ALL EXISTING DATA WILL BE LOST *\n`,
|
|
187
110
|
`********************************************\n`,
|
|
@@ -189,4 +112,4 @@ function hasExistingSettings(envfile = '/etc/drumee/drumee.json') {
|
|
|
189
112
|
return true;
|
|
190
113
|
}
|
|
191
114
|
|
|
192
|
-
module.exports = { args,
|
|
115
|
+
module.exports = { args, hasExistingSettings };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
$TTL 3D
|
|
2
|
+
$ORIGIN <%= domain %>.
|
|
3
|
+
;
|
|
4
|
+
@ IN SOA ns1.<%= domain %>. master.<%= domain %>. (
|
|
5
|
+
<%= serial %> ; serial, today date + today serial
|
|
6
|
+
1H ; refresh, seconds
|
|
7
|
+
2H ; retry, seconds
|
|
8
|
+
4W ; expire, seconds
|
|
9
|
+
1D ) ; minimum, seconds
|
|
10
|
+
;
|
|
11
|
+
;
|
|
12
|
+
@ 60 IN NS ns1.<%= domain %>.
|
|
13
|
+
@ 60 IN NS ns2.<%= domain %>.
|
|
14
|
+
;
|
|
15
|
+
<% if (typeof(public_ip4) !== "undefined" && public_ip4 != "" ) { %>
|
|
16
|
+
; A records
|
|
17
|
+
@ 60 IN A <%= public_ip4 %>
|
|
18
|
+
ns1 60 IN A <%= public_ip4 %>
|
|
19
|
+
ns2 60 IN A <%= public_ip4 %>
|
|
20
|
+
smtp 60 IN A <%= public_ip4 %>
|
|
21
|
+
jit 60 IN A <%= public_ip4 %>
|
|
22
|
+
* 60 IN A <%= public_ip4 %>
|
|
23
|
+
;
|
|
24
|
+
<% } %>
|
|
25
|
+
<% if (typeof(public_ip6) !== "undefined" && public_ip6 != "" ) { %>
|
|
26
|
+
; AAAA records
|
|
27
|
+
@ 60 IN AAAA <%= public_ip6 %>
|
|
28
|
+
ns1 60 IN AAAA <%= public_ip6 %>
|
|
29
|
+
ns2 60 IN AAAA <%= public_ip6 %>
|
|
30
|
+
smtp 60 IN AAAA <%= public_ip6 %>
|
|
31
|
+
jit 60 IN AAAA <%= public_ip6 %>
|
|
32
|
+
* 60 IN AAAA <%= public_ip6 %>
|
|
33
|
+
<% } %>
|
|
34
|
+
;
|
|
35
|
+
; CNAME
|
|
36
|
+
;
|
|
37
|
+
www IN CNAME <%= domain %>.
|
|
38
|
+
;
|
|
39
|
+
; MX records
|
|
40
|
+
;
|
|
41
|
+
@ 60 IN MX 10 smtp.<%= domain %>.
|
|
42
|
+
|
|
43
|
+
; TXT records
|
|
44
|
+
_acme-challenge 60 IN TXT "acme-challenge"
|
|
45
|
+
@ 60 IN TXT "v=spf1 a ~all"
|
|
46
|
+
@ 60 IN TXT (<%= dkim_key %>)
|
|
47
|
+
;
|
|
48
|
+
;
|
|
49
|
+
; DKIM
|
|
50
|
+
smtp._domainkey 60 IN TXT (<%= dkim_key %>)
|
|
51
|
+
dkim._domainkey 60 IN TXT (<%= dkim_key %>)
|
|
52
|
+
;
|
|
53
|
+
;
|
|
54
|
+
; DMARC
|
|
55
|
+
_dmarc 60 IN TXT "v=DMARC1; p=quarantine; sp=quarantine; aspf=s"
|
|
56
|
+
;
|
|
57
|
+
;
|
|
58
|
+
; Jitsi subdomain
|
|
59
|
+
$ORIGIN <%= jitsi_public_domain %>.
|
|
60
|
+
;
|
|
61
|
+
<% if (typeof(public_ip4) !== "undefined" && public_ip4 != "" ) { %>
|
|
62
|
+
* 60 IN A <%= public_ip4 %>
|
|
63
|
+
<% } %>
|
|
64
|
+
<% if (typeof(public_ip6) !== "undefined" && public_ip6 != "" ) { %>
|
|
65
|
+
* 60 IN AAAA <%= public_ip6 %>
|
|
66
|
+
<% } %>
|
|
67
|
+
;
|
|
68
|
+
; TXT records
|
|
69
|
+
_acme-challenge 60 IN TXT "jit-acme-challenge"
|
|
70
|
+
|
|
@@ -40,15 +40,6 @@ www IN CNAME <%= private_domain %>.
|
|
|
40
40
|
;
|
|
41
41
|
@ 60 IN MX 10 smtp.<%= private_domain %>.
|
|
42
42
|
|
|
43
|
-
; TXT records
|
|
44
|
-
_acme-challenge 60 IN TXT "acme-challenge"
|
|
45
|
-
@ 60 IN TXT "v=spf1 a ~all"
|
|
46
|
-
@ 60 IN TXT (<%= dkim_key %>)
|
|
47
|
-
;
|
|
48
|
-
;
|
|
49
|
-
; DKIM
|
|
50
|
-
smtp._domainkey 60 IN TXT (<%= dkim_key %>)
|
|
51
|
-
dkim._domainkey 60 IN TXT (<%= dkim_key %>)
|
|
52
43
|
;
|
|
53
44
|
;
|
|
54
45
|
; DMARC
|
|
@@ -56,7 +47,7 @@ _dmarc 60 IN TXT "v=DMARC1; p=quarantine; sp=quarantine; aspf=s"
|
|
|
56
47
|
;
|
|
57
48
|
;
|
|
58
49
|
; Jitsi subdomain
|
|
59
|
-
$ORIGIN <%=
|
|
50
|
+
$ORIGIN <%= jitsi_private_domain %>.
|
|
60
51
|
;
|
|
61
52
|
<% if (typeof(private_ip4) !== "undefined" && private_ip4 != "" ) { %>
|
|
62
53
|
* 60 IN A <%= private_ip4 %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$TTL 3D
|
|
2
|
-
$ORIGIN <%=
|
|
2
|
+
$ORIGIN <%= reverse_public_ip4 %>.
|
|
3
3
|
;
|
|
4
|
-
@ IN SOA ns1.<%=
|
|
4
|
+
@ IN SOA ns1.<%= public_domain %>. master.<%= public_domain %>. (
|
|
5
5
|
<%= serial %> ; serial, today date + today serial
|
|
6
6
|
1H ; refresh, seconds
|
|
7
7
|
2H ; retry, seconds
|
|
@@ -9,9 +9,9 @@ $ORIGIN <%= reverse_ip4 %>.
|
|
|
9
9
|
1D ) ; minimum, seconds
|
|
10
10
|
;
|
|
11
11
|
;
|
|
12
|
-
@ IN NS ns1.<%=
|
|
13
|
-
@ IN NS ns2.<%=
|
|
12
|
+
@ IN NS ns1.<%= public_domain %>.
|
|
13
|
+
@ IN NS ns2.<%= public_domain %>.
|
|
14
14
|
|
|
15
|
-
2 IN PTR ns1.<%=
|
|
16
|
-
3 IN PTR ns2.<%=
|
|
17
|
-
3 IN PTR smtp.<%=
|
|
15
|
+
2 IN PTR ns1.<%= public_domain %>.
|
|
16
|
+
3 IN PTR ns2.<%= public_domain %>.
|
|
17
|
+
3 IN PTR smtp.<%= public_domain %>.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$TTL 3D
|
|
2
|
-
$ORIGIN <%=
|
|
2
|
+
$ORIGIN <%= public_domain %>.
|
|
3
3
|
;
|
|
4
|
-
@ IN SOA ns1.<%=
|
|
4
|
+
@ IN SOA ns1.<%= public_domain %>. master.<%= public_domain %>. (
|
|
5
5
|
<%= serial %> ; serial, today date + today serial
|
|
6
6
|
1H ; refresh, seconds
|
|
7
7
|
2H ; retry, seconds
|
|
@@ -9,8 +9,8 @@ $ORIGIN <%= domain %>.
|
|
|
9
9
|
1D ) ; minimum, seconds
|
|
10
10
|
;
|
|
11
11
|
;
|
|
12
|
-
@ 60 IN NS ns1.<%=
|
|
13
|
-
@ 60 IN NS ns2.<%=
|
|
12
|
+
@ 60 IN NS ns1.<%= public_domain %>.
|
|
13
|
+
@ 60 IN NS ns2.<%= public_domain %>.
|
|
14
14
|
;
|
|
15
15
|
<% if (typeof(public_ip4) !== "undefined" && public_ip4 != "" ) { %>
|
|
16
16
|
; A records
|
|
@@ -34,11 +34,11 @@ jit 60 IN AAAA <%= public_ip6 %>
|
|
|
34
34
|
;
|
|
35
35
|
; CNAME
|
|
36
36
|
;
|
|
37
|
-
www IN CNAME <%=
|
|
37
|
+
www IN CNAME <%= public_domain %>.
|
|
38
38
|
;
|
|
39
39
|
; MX records
|
|
40
40
|
;
|
|
41
|
-
@ 60 IN MX 10 smtp.<%=
|
|
41
|
+
@ 60 IN MX 10 smtp.<%= public_domain %>.
|
|
42
42
|
|
|
43
43
|
; TXT records
|
|
44
44
|
_acme-challenge 60 IN TXT "acme-challenge"
|
|
@@ -56,7 +56,7 @@ _dmarc 60 IN TXT "v=DMARC1; p=quarantine; sp=quarantine; aspf=s"
|
|
|
56
56
|
;
|
|
57
57
|
;
|
|
58
58
|
; Jitsi subdomain
|
|
59
|
-
$ORIGIN <%=
|
|
59
|
+
$ORIGIN <%= jitsi_public_domain %>.
|
|
60
60
|
;
|
|
61
61
|
<% if (typeof(public_ip4) !== "undefined" && public_ip4 != "" ) { %>
|
|
62
62
|
* 60 IN A <%= public_ip4 %>
|
package/bin/init-private
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -e
|
|
3
|
-
source /etc/drumee/drumee.sh
|
|
4
|
-
|
|
5
|
-
echo "Configuring private domain name..."
|
|
6
|
-
|
|
7
|
-
if [ "$DRUMEE_PRIVATE_DOMAIN" = "" ]; then
|
|
8
|
-
if [ "$DRUMEE_DOMAIN_NAME" = "" ]; then
|
|
9
|
-
export DRUMEE_PRIVATE_DOMAIN=drumee.local
|
|
10
|
-
else
|
|
11
|
-
echo "Private domain name not found. Will run only on public mode."
|
|
12
|
-
exit 0
|
|
13
|
-
fi
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
mydomain=$DRUMEE_PRIVATE_DOMAIN
|
|
17
|
-
outdir=${CERTS_DIR}/${mydomain}_ecc
|
|
18
|
-
|
|
19
|
-
key=${outdir}/${mydomain}.key
|
|
20
|
-
csr=${outdir}/${mydomain}.csr
|
|
21
|
-
cer=${outdir}/${mydomain}.cer
|
|
22
|
-
|
|
23
|
-
mkir -p $outdir
|
|
24
|
-
|
|
25
|
-
C=$(locale --all | grep utf8 | tail -1 | sed -E "s/^(.+_)|(\..+)$//g")
|
|
26
|
-
if [ "$C" = "" ]; then
|
|
27
|
-
C=XX
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
openssl genpkey -algorithm RSA -out $key
|
|
31
|
-
|
|
32
|
-
openssl req -new -key $key -out $csr -subj "/C=${C}/ST= /L=Local Domain /O=${DRUMEE_DESCRIPTION} /OU=${DRUMEE_DESCRIPTION} /CN=*.${mydomain} /emailAddress=${ADMIN_EMAIL}"
|
|
33
|
-
|
|
34
|
-
openssl x509 -req -in $csr -signkey $key -out $cer
|
|
35
|
-
|
|
36
|
-
openssl x509 -in $cer -noout -text
|
|
37
|
-
|
|
38
|
-
cp $cer /etc/ssl/certs/
|
|
39
|
-
|
|
40
|
-
exit 0
|
package/bin/set-jitsi-conf
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
if [ -e /etc/drumee/drumee.sh ]; then
|
|
3
|
-
if [ -e /etc/prosody/defaults/credentials.sh ]; then
|
|
4
|
-
. /etc/drumee/drumee.sh
|
|
5
|
-
. /etc/prosody/defaults/credentials.sh
|
|
6
|
-
. /usr/share/debconf/confmodule
|
|
7
|
-
turn_secret=$(grep static-auth-secret /etc/turnserver.conf | sed -E "s/^.+=//")
|
|
8
|
-
db_set jitsi-videobridge/jvb-hostname $JITSI_DOMAIN
|
|
9
|
-
db_set jitsi-videobridge/jvbsecret $JVB_PASSWORD
|
|
10
|
-
db_set jicofo/jicofo-authpassword $JICOFO_PASSWORD
|
|
11
|
-
db_set jitsi-meet-prosody/jvb-hostname $JITSI_DOMAIN
|
|
12
|
-
db_set jitsi-meet-prosody/turn-secret $turn_secret
|
|
13
|
-
fi
|
|
14
|
-
fi
|