@drumee/setup-infra 1.0.0
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/LICENSE +661 -0
- package/README.md +3 -0
- package/configs/etc/cron.d/drumee +6 -0
- package/configs/etc/postfix/master.cf +137 -0
- package/congigure/init/acme +69 -0
- package/congigure/init/mail +16 -0
- package/congigure/init/named +27 -0
- package/congigure/menu/menu -tmp +144 -0
- package/congigure/menu/menu-install +147 -0
- package/congigure/menu/menu-reinstall +15 -0
- package/congigure/prepare +10 -0
- package/congigure/preset/jitsi +9 -0
- package/congigure/setup-infra +58 -0
- package/congigure/setup-schemas +57 -0
- package/congigure/start +29 -0
- package/congigure/utils/configure +56 -0
- package/congigure/utils/dependencies +90 -0
- package/congigure/utils/jitsi +122 -0
- package/congigure/utils/misc +77 -0
- package/congigure/utils/prompt.sh +35 -0
- package/congigure/utils/setup-versions +7 -0
- package/index.js +572 -0
- package/package.json +30 -0
- package/template.js +453 -0
- package/templates/env/application.json.tpl +0 -0
- package/templates/env/logrotate.tpl +7 -0
- package/templates/etc/bind/named.conf.local +13 -0
- package/templates/etc/bind/named.conf.log +105 -0
- package/templates/etc/bind/named.conf.options +33 -0
- package/templates/etc/dkimkeys/dkim.key +1 -0
- package/templates/etc/drumee/conf.d/conference.json.tpl +9 -0
- package/templates/etc/drumee/conf.d/drumee.json.tpl +7 -0
- package/templates/etc/drumee/conf.d/exchange.json.tpl +4 -0
- package/templates/etc/drumee/conf.d/myDrumee.json.tpl +16 -0
- package/templates/etc/drumee/credential/db.json.tpl +6 -0
- package/templates/etc/drumee/credential/email.json.tpl +12 -0
- package/templates/etc/drumee/credential/ovh/dns.json.tpl +6 -0
- package/templates/etc/drumee/credential/ovh/dns.sh.tpl +7 -0
- package/templates/etc/drumee/credential/redis.json.tpl +6 -0
- package/templates/etc/drumee/credential/sms.json.tpl +6 -0
- package/templates/etc/drumee/dnsapi.sh.tpl +28 -0
- package/templates/etc/drumee/drumee.sh.tpl +43 -0
- package/templates/etc/drumee/env.json +29 -0
- package/templates/etc/drumee/infrastructure/internals/accel.conf.tpl +47 -0
- package/templates/etc/drumee/infrastructure/mfs.conf.tpl +16 -0
- package/templates/etc/drumee/infrastructure/platform.json.tpl +16 -0
- package/templates/etc/drumee/infrastructure/routes/main.conf.tpl +143 -0
- package/templates/etc/drumee/infrastructure/servers/tt.conf +199 -0
- package/templates/etc/drumee/ssl/main.conf.tpl +10 -0
- package/templates/etc/jitsi/jicofo/config +2 -0
- package/templates/etc/jitsi/jicofo/defaults/jicofo.conf +225 -0
- package/templates/etc/jitsi/jicofo/defaults/logging.properties +15 -0
- package/templates/etc/jitsi/jicofo/jicofo.conf.tpl +46 -0
- package/templates/etc/jitsi/jicofo/logging.properties.tpl +12 -0
- package/templates/etc/jitsi/meet.conf.tpl +131 -0
- package/templates/etc/jitsi/ssl.conf.tpl +25 -0
- package/templates/etc/jitsi/videobridge/config +2 -0
- package/templates/etc/jitsi/videobridge/defaults/jvb.conf +129 -0
- package/templates/etc/jitsi/videobridge/defaults/logging.properties +12 -0
- package/templates/etc/jitsi/videobridge/jvb.conf +67 -0
- package/templates/etc/jitsi/videobridge/logging.properties.tpl +12 -0
- package/templates/etc/jitsi/web/config.js.tpl +208 -0
- package/templates/etc/jitsi/web/defaults/default +26 -0
- package/templates/etc/jitsi/web/defaults/ffdhe2048.txt +8 -0
- package/templates/etc/jitsi/web/defaults/interface_config.js +273 -0
- package/templates/etc/jitsi/web/defaults/meet.conf +193 -0
- package/templates/etc/jitsi/web/defaults/nginx.conf +73 -0
- package/templates/etc/jitsi/web/defaults/settings-config.js +480 -0
- package/templates/etc/jitsi/web/defaults/ssl.conf +28 -0
- package/templates/etc/jitsi/web/defaults/system-config.js +60 -0
- package/templates/etc/jitsi/web/interface_config.js +273 -0
- package/templates/etc/mail/dkim.key +1 -0
- package/templates/etc/mailname +1 -0
- package/templates/etc/mysql/mariadb.conf.d/50-server.cnf +120 -0
- package/templates/etc/nginx/modules-enabled/90-turn-relay.conf +27 -0
- package/templates/etc/nginx/modules-enabled/90-turn-relay.conf.tpl +27 -0
- package/templates/etc/nginx/nginx.conf +65 -0
- package/templates/etc/nginx/sites-enabled/drumee.conf.tpl +33 -0
- package/templates/etc/nginx/sites-enabled/jitsi.conf.tpl +28 -0
- package/templates/etc/nginx/sites-enabled/turnrelay.conf.tpl +9 -0
- package/templates/etc/opendkim/KeyTable +1 -0
- package/templates/etc/postfix/main.cf +76 -0
- package/templates/etc/postfix/mysql-virtual-alias-maps.cf +5 -0
- package/templates/etc/postfix/mysql-virtual-mailbox-domains.cf +5 -0
- package/templates/etc/postfix/mysql-virtual-mailbox-maps.cf +5 -0
- package/templates/etc/prosody/conf.d/vhost.cfg.lua.tpl +162 -0
- package/templates/etc/prosody/defaults/conf.d/jitsi-meet.cfg.lua +406 -0
- package/templates/etc/prosody/defaults/credentials.sh +10 -0
- package/templates/etc/prosody/defaults/prosody.cfg.lua +225 -0
- package/templates/etc/prosody/defaults/saslauthd.conf +30 -0
- package/templates/etc/prosody/prosody.cfg.lua.tpl +203 -0
- package/templates/etc/turnserver.conf.tpl +46 -0
- package/templates/index.js +102 -0
- package/templates/schema/utils/configs.init.sql.tpl +20 -0
- package/templates/schema/utils/configs.update.sql.tpl +19 -0
- package/templates/server/ecosystem.config.js.tpl +8 -0
- package/templates/var/lib/bind/domain.tpl +70 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Postfix master process configuration file. For details on the format
|
|
3
|
+
# of the file, see the master(5) manual page (command: "man 5 master" or
|
|
4
|
+
# on-line: http://www.postfix.org/master.5.html).
|
|
5
|
+
#
|
|
6
|
+
# Do not forget to execute "postfix reload" after editing this file.
|
|
7
|
+
#
|
|
8
|
+
# ==========================================================================
|
|
9
|
+
# service type private unpriv chroot wakeup maxproc command + args
|
|
10
|
+
# (yes) (yes) (no) (never) (100)
|
|
11
|
+
# ==========================================================================
|
|
12
|
+
smtp inet n - y - - smtpd
|
|
13
|
+
#smtp inet n - y - 1 postscreen
|
|
14
|
+
#smtpd pass - - y - - smtpd
|
|
15
|
+
#dnsblog unix - - y - 0 dnsblog
|
|
16
|
+
#tlsproxy unix - - y - 0 tlsproxy
|
|
17
|
+
# Choose one: enable submission for loopback clients only, or for any client.
|
|
18
|
+
127.0.0.1:submission inet n - y - - smtpd
|
|
19
|
+
#submission inet n - y - - smtpd
|
|
20
|
+
# -o syslog_name=postfix/submission
|
|
21
|
+
# -o smtpd_tls_security_level=encrypt
|
|
22
|
+
# -o smtpd_sasl_auth_enable=yes
|
|
23
|
+
# -o smtpd_tls_auth_only=yes
|
|
24
|
+
# -o smtpd_reject_unlisted_recipient=no
|
|
25
|
+
# Instead of specifying complex smtpd_<xxx>_restrictions here,
|
|
26
|
+
# specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
|
|
27
|
+
# here, and specify mua_<xxx>_restrictions in main.cf (where
|
|
28
|
+
# "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
|
|
29
|
+
# -o smtpd_client_restrictions=
|
|
30
|
+
# -o smtpd_helo_restrictions=
|
|
31
|
+
# -o smtpd_sender_restrictions=
|
|
32
|
+
# -o smtpd_relay_restrictions=
|
|
33
|
+
# -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
|
|
34
|
+
# -o milter_macro_daemon_name=ORIGINATING
|
|
35
|
+
# Choose one: enable submissions for loopback clients only, or for any client.
|
|
36
|
+
#127.0.0.1:submissions inet n - y - - smtpd
|
|
37
|
+
#submissions inet n - y - - smtpd
|
|
38
|
+
# -o syslog_name=postfix/submissions
|
|
39
|
+
# -o smtpd_tls_wrappermode=yes
|
|
40
|
+
# -o smtpd_sasl_auth_enable=yes
|
|
41
|
+
# -o smtpd_reject_unlisted_recipient=no
|
|
42
|
+
# Instead of specifying complex smtpd_<xxx>_restrictions here,
|
|
43
|
+
# specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
|
|
44
|
+
# here, and specify mua_<xxx>_restrictions in main.cf (where
|
|
45
|
+
# "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
|
|
46
|
+
# -o smtpd_client_restrictions=
|
|
47
|
+
# -o smtpd_helo_restrictions=
|
|
48
|
+
# -o smtpd_sender_restrictions=
|
|
49
|
+
# -o smtpd_relay_restrictions=
|
|
50
|
+
# -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
|
|
51
|
+
# -o milter_macro_daemon_name=ORIGINATING
|
|
52
|
+
#628 inet n - y - - qmqpd
|
|
53
|
+
pickup unix n - y 60 1 pickup
|
|
54
|
+
cleanup unix n - y - 0 cleanup
|
|
55
|
+
qmgr unix n - n 300 1 qmgr
|
|
56
|
+
#qmgr unix n - n 300 1 oqmgr
|
|
57
|
+
tlsmgr unix - - y 1000? 1 tlsmgr
|
|
58
|
+
rewrite unix - - y - - trivial-rewrite
|
|
59
|
+
bounce unix - - y - 0 bounce
|
|
60
|
+
defer unix - - y - 0 bounce
|
|
61
|
+
trace unix - - y - 0 bounce
|
|
62
|
+
verify unix - - y - 1 verify
|
|
63
|
+
flush unix n - y 1000? 0 flush
|
|
64
|
+
proxymap unix - - n - - proxymap
|
|
65
|
+
proxywrite unix - - n - 1 proxymap
|
|
66
|
+
smtp unix - - y - - smtp
|
|
67
|
+
relay unix - - y - - smtp
|
|
68
|
+
-o syslog_name=postfix/$service_name
|
|
69
|
+
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
|
|
70
|
+
showq unix n - y - - showq
|
|
71
|
+
error unix - - y - - error
|
|
72
|
+
retry unix - - y - - error
|
|
73
|
+
discard unix - - y - - discard
|
|
74
|
+
local unix - n n - - local
|
|
75
|
+
virtual unix - n n - - virtual
|
|
76
|
+
lmtp unix - - y - - lmtp
|
|
77
|
+
anvil unix - - y - 1 anvil
|
|
78
|
+
scache unix - - y - 1 scache
|
|
79
|
+
postlog unix-dgram n - n - 1 postlogd
|
|
80
|
+
#
|
|
81
|
+
# ====================================================================
|
|
82
|
+
# Interfaces to non-Postfix software. Be sure to examine the manual
|
|
83
|
+
# pages of the non-Postfix software to find out what options it wants.
|
|
84
|
+
#
|
|
85
|
+
# Many of the following services use the Postfix pipe(8) delivery
|
|
86
|
+
# agent. See the pipe(8) man page for information about ${recipient}
|
|
87
|
+
# and other message envelope options.
|
|
88
|
+
# ====================================================================
|
|
89
|
+
#
|
|
90
|
+
# maildrop. See the Postfix MAILDROP_README file for details.
|
|
91
|
+
# Also specify in main.cf: maildrop_destination_recipient_limit=1
|
|
92
|
+
#
|
|
93
|
+
maildrop unix - n n - - pipe
|
|
94
|
+
flags=DRXhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
|
|
95
|
+
#
|
|
96
|
+
# ====================================================================
|
|
97
|
+
#
|
|
98
|
+
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
|
|
99
|
+
#
|
|
100
|
+
# Specify in cyrus.conf:
|
|
101
|
+
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
|
|
102
|
+
#
|
|
103
|
+
# Specify in main.cf one or more of the following:
|
|
104
|
+
# mailbox_transport = lmtp:inet:localhost
|
|
105
|
+
# virtual_transport = lmtp:inet:localhost
|
|
106
|
+
#
|
|
107
|
+
# ====================================================================
|
|
108
|
+
#
|
|
109
|
+
# Cyrus 2.1.5 (Amos Gouaux)
|
|
110
|
+
# Also specify in main.cf: cyrus_destination_recipient_limit=1
|
|
111
|
+
#
|
|
112
|
+
#cyrus unix - n n - - pipe
|
|
113
|
+
# flags=DRX user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
|
|
114
|
+
#
|
|
115
|
+
# ====================================================================
|
|
116
|
+
# Old example of delivery via Cyrus.
|
|
117
|
+
#
|
|
118
|
+
#old-cyrus unix - n n - - pipe
|
|
119
|
+
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
|
|
120
|
+
#
|
|
121
|
+
# ====================================================================
|
|
122
|
+
#
|
|
123
|
+
# See the Postfix UUCP_README file for configuration details.
|
|
124
|
+
#
|
|
125
|
+
uucp unix - n n - - pipe
|
|
126
|
+
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
|
|
127
|
+
#
|
|
128
|
+
# Other external delivery methods.
|
|
129
|
+
#
|
|
130
|
+
ifmail unix - n n - - pipe
|
|
131
|
+
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
|
|
132
|
+
bsmtp unix - n n - - pipe
|
|
133
|
+
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
|
|
134
|
+
scalemail-backend unix - n n - 2 pipe
|
|
135
|
+
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
|
|
136
|
+
mailman unix - n n - - pipe
|
|
137
|
+
flags=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "Configuring certificates..."
|
|
4
|
+
#-------------------
|
|
5
|
+
function make_certs(){
|
|
6
|
+
sum=0
|
|
7
|
+
dom=$1
|
|
8
|
+
echo Generating "${dom}" cetificates...
|
|
9
|
+
while [ ! -f ${ACME_CERTS_DIR}/${dom}_ecc/fullchain.cer ]; do
|
|
10
|
+
./acme.sh --issue -d $dom -d "*.${dom}" --home $ACME_DIR --config-home $ACME_DIR/configs --cert-home $ACME_CERTS_DIR --dns dns_nsupdate
|
|
11
|
+
if [ $? = "0" ]; then
|
|
12
|
+
echo Certificate have been sucessfully created.
|
|
13
|
+
else
|
|
14
|
+
echo Certificate have not been created. Retrying in 5 seconds. Please wait.
|
|
15
|
+
sleep 5
|
|
16
|
+
fi
|
|
17
|
+
if [ "$sum" -gt "10" ]; then
|
|
18
|
+
echo Failed to create certifiicates. Please rune manually
|
|
19
|
+
echo $ACME_DIR/acme.sh --issue -d $dom -d "*.${dom}" --home $ACME_DIR --config-home $ACME_DIR/configs --cert-home $ACME_CERTS_DIR --dns dns_nsupdate
|
|
20
|
+
fi
|
|
21
|
+
sum=$(expr 1 + $sum)
|
|
22
|
+
done
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
set +e
|
|
26
|
+
cron_entry=$(crontab -l | grep acme-cron)
|
|
27
|
+
if [ "$cron_entry" != "" ]; then
|
|
28
|
+
echo "Acme cron already created"
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
set +e
|
|
33
|
+
source /etc/drumee/drumee.sh
|
|
34
|
+
|
|
35
|
+
if [ "$OWN_SSL" != "" ]; then
|
|
36
|
+
echo "You will have to setup your own SSL certificates"
|
|
37
|
+
exit 0
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if [ "$ACME_DIR" = "" ]; then
|
|
41
|
+
export ACME_DIR=/usr/share/acme
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
if [ ! -d $ACME_DIR ]; then
|
|
45
|
+
mkdir -p $ACME_DIR
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
cd $ACME_DIR
|
|
49
|
+
|
|
50
|
+
failed=0
|
|
51
|
+
|
|
52
|
+
./acme.sh --register-account -m $ACME_EMAIL_ACCOUNT --home $ACME_DIR --config-home $ACME_DIR/configs --cert-home $ACME_CERTS_DIR
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
make_certs $DRUMEE_DOMAIN_NAME
|
|
56
|
+
make_certs $JITSI_DOMAIN
|
|
57
|
+
|
|
58
|
+
usermod -a -G $DRUMEE_SYSTEM_GROUP prosody
|
|
59
|
+
usermod -a -G $DRUMEE_SYSTEM_GROUP jvb
|
|
60
|
+
usermod -a -G $DRUMEE_SYSTEM_GROUP jicofo
|
|
61
|
+
usermod -a -G $DRUMEE_SYSTEM_GROUP turnserver
|
|
62
|
+
usermod -a -G $DRUMEE_SYSTEM_GROUP postfix
|
|
63
|
+
|
|
64
|
+
if [ -d "$ACME_CERTS_DIR" ]; then
|
|
65
|
+
chown -R $DRUMEE_SYSTEM_USER:$DRUMEE_SYSTEM_GROUP $ACME_CERTS_DIR
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
echo "ACME has been successfuly installed!"
|
|
69
|
+
exit 0
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
if [ "$DRUMEE_DOMAIN_NAME" = "" ]; then
|
|
3
|
+
echo "Domain name was not defined"
|
|
4
|
+
exit 1
|
|
5
|
+
fi
|
|
6
|
+
|
|
7
|
+
echo "Configuring DKIM for domain $DRUMEE_DOMAIN_NAME"
|
|
8
|
+
set -e
|
|
9
|
+
|
|
10
|
+
dkim_dir=/etc/opendkim/keys/$DRUMEE_DOMAIN_NAME
|
|
11
|
+
mkdir -p $dkim_dir
|
|
12
|
+
cd $dkim_dir
|
|
13
|
+
key_file=private.pem
|
|
14
|
+
openssl genrsa -out $key_file 2048
|
|
15
|
+
openssl rsa -in $key_file -pubout -outform der 2>/dev/null | openssl base64 -A > dkim.txt
|
|
16
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
source /etc/drumee/drumee.sh
|
|
4
|
+
|
|
5
|
+
echo "Configuring DNS server for $DRUMEE_DOMAIN_NAME"
|
|
6
|
+
|
|
7
|
+
service named stop
|
|
8
|
+
mkdir -p /var/log/named/
|
|
9
|
+
chown -R bind:bind /var/log/named/
|
|
10
|
+
mkdir -p /etc/bind/keys/
|
|
11
|
+
|
|
12
|
+
if [ "$NSUPDATE_KEY" = "" ];then
|
|
13
|
+
export NSUPDATE_KEY=/etc/bind/keys/update.key
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
echo Will use update key from $NSUPDATE_KEY
|
|
17
|
+
if [ ! -f "$NSUPDATE_KEY" ]; then
|
|
18
|
+
echo Generating tsig key
|
|
19
|
+
tsig-keygen -a hmac-sha512 update > $NSUPDATE_KEY
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
chown -R bind:bind /etc/bind
|
|
23
|
+
|
|
24
|
+
echo Restarting named
|
|
25
|
+
service named restart
|
|
26
|
+
|
|
27
|
+
echo "DNS server has been successfuly setup!"
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# Source debconf library
|
|
5
|
+
. /usr/share/debconf/confmodule
|
|
6
|
+
|
|
7
|
+
echo "Installing Drumee from Debian Packages"
|
|
8
|
+
script_dir=$(dirname $(readlink -f $0))
|
|
9
|
+
|
|
10
|
+
. ${script_dir}/functions
|
|
11
|
+
|
|
12
|
+
db_input high drumee/version || true
|
|
13
|
+
db_input high drumee/description || true
|
|
14
|
+
# DRUMEE_DOMAIN_NAME
|
|
15
|
+
dom_pattern="^([a-zA-Z0-9_\-]+)(\.[a-zA-Z0-9_\-]+)*$"
|
|
16
|
+
db_input high drumee/domain || true
|
|
17
|
+
db_go
|
|
18
|
+
|
|
19
|
+
db_get drumee/domain
|
|
20
|
+
is_valid=$(echo $RET | grep -E "$dom_pattern")
|
|
21
|
+
while [ "$is_valid" = "" ]
|
|
22
|
+
do
|
|
23
|
+
db_input high drumee/domain || true
|
|
24
|
+
db_get drumee/domain
|
|
25
|
+
is_valid=$(echo $RET | grep -E "$dom_pattern")
|
|
26
|
+
done
|
|
27
|
+
|
|
28
|
+
#prompt drumee/domain "^([a-zA-Z0-9_\-]+)(\.[a-zA-Z0-9_\-]+)*$"
|
|
29
|
+
export DRUMEE_DOMAIN_NAME=$RET
|
|
30
|
+
|
|
31
|
+
if [ "$DRUMEE_DOMAIN_NAME" = "local" ]; then
|
|
32
|
+
db_input high drumee/local_mode || true
|
|
33
|
+
db_get drumee/local_mode
|
|
34
|
+
LOCAL_MODE=$RET
|
|
35
|
+
else
|
|
36
|
+
db_input high drumee/services || true
|
|
37
|
+
db_get drumee/services
|
|
38
|
+
SERVICES=$RET
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# PUBLIC_IP4
|
|
42
|
+
#prompt drumee/public_ip4 "^([0-9]{1,3})(\.[0-9]{1,3}){3}$"
|
|
43
|
+
# ip4_pattern="^([0-9]{1,3})(\.[0-9]{1,3}){3}$"
|
|
44
|
+
# db_input high drumee/public_ip4 || true
|
|
45
|
+
# db_go
|
|
46
|
+
# db_get drumee/public_ip4
|
|
47
|
+
# is_valid=$(echo $RET | grep -E "$ip4_pattern")
|
|
48
|
+
# while [ "$is_valid" = "" ]
|
|
49
|
+
# do
|
|
50
|
+
# db_input high drumee/public_ip4 || true
|
|
51
|
+
# db_go
|
|
52
|
+
# db_get drumee/public_ip4
|
|
53
|
+
# is_valid=$(echo $RET | grep -E "$ip4_pattern")
|
|
54
|
+
# done
|
|
55
|
+
export PUBLIC_IP4=$RET
|
|
56
|
+
|
|
57
|
+
# PUBLIC_IP6
|
|
58
|
+
#prompt drumee/public_ip6 "^([[:xdigit:]]{1,4})(:[[:xdigit:]]{0,4})*$"
|
|
59
|
+
# ip6_pattern="^([[:xdigit:]]{1,4})(:[[:xdigit:]]{0,4})*$"
|
|
60
|
+
# db_input high drumee/public_ip6 || true
|
|
61
|
+
# db_go
|
|
62
|
+
# db_get drumee/public_ip6
|
|
63
|
+
# is_valid=$(echo $RET | grep -E "$ip6_pattern")
|
|
64
|
+
# while [ "$is_valid" = "" ]
|
|
65
|
+
# do
|
|
66
|
+
# db_input high drumee/public_ip6 || true
|
|
67
|
+
# db_go
|
|
68
|
+
# db_get drumee/public_ip6
|
|
69
|
+
# is_valid=$(echo $RET | grep -E "$ip6_pattern")
|
|
70
|
+
# done
|
|
71
|
+
export PUBLIC_IP6=$RET
|
|
72
|
+
|
|
73
|
+
# ADMIN_EMAIL
|
|
74
|
+
email_pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$"
|
|
75
|
+
#prompt drumee/admin_email $email_pattern
|
|
76
|
+
# db_input high drumee/admin_email || true
|
|
77
|
+
# db_go
|
|
78
|
+
# db_get drumee/admin_email
|
|
79
|
+
# is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
80
|
+
# while [ "$is_valid" = "" ]
|
|
81
|
+
# do
|
|
82
|
+
# db_input high drumee/admin_email || true
|
|
83
|
+
# db_go
|
|
84
|
+
# db_get drumee/admin_email
|
|
85
|
+
# is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
86
|
+
# done
|
|
87
|
+
export ADMIN_EMAIL=$RET
|
|
88
|
+
|
|
89
|
+
# ACME_EMAIL_ACCOUNT
|
|
90
|
+
db_input high drumee/acme_email_account || true
|
|
91
|
+
db_get drumee/acme_email_account
|
|
92
|
+
if [ "$RET" = "" ]; then
|
|
93
|
+
export ACME_EMAIL_ACCOUNT=$ADMIN_EMAIL
|
|
94
|
+
else
|
|
95
|
+
prompt drumee/acme_email_account $email_pattern
|
|
96
|
+
# is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
97
|
+
# while [ "$is_valid" = "" ]
|
|
98
|
+
# do
|
|
99
|
+
# db_input high drumee/acme_email_account || true
|
|
100
|
+
# db_go
|
|
101
|
+
# db_get drumee/acme_email_account
|
|
102
|
+
# is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
103
|
+
# done
|
|
104
|
+
export ACME_EMAIL_ACCOUNT=$RET
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# DRUMEE_DB_DIR
|
|
108
|
+
dir_pattern='^/+(usr|bin|sys|proc|tmp|etc|lib.*|boot|dev|sbin|opt|media|mnt|vmlinuz.*|lost.+|snap|root|run|initrd.*)'
|
|
109
|
+
#prompt drumee/db_dir $dir_pattern
|
|
110
|
+
# db_input high drumee/db_dir || true
|
|
111
|
+
# db_go
|
|
112
|
+
# db_get drumee/db_dir
|
|
113
|
+
# is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
114
|
+
# while [ "$is_valid" != "" ]
|
|
115
|
+
# do
|
|
116
|
+
# db_input high drumee/db_dir || true
|
|
117
|
+
# db_go
|
|
118
|
+
# db_get drumee/db_dir
|
|
119
|
+
# is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
120
|
+
# done
|
|
121
|
+
export DRUMEE_DB_DIR=$RET
|
|
122
|
+
|
|
123
|
+
# DRUMEE_DATA_DIR
|
|
124
|
+
#prompt drumee/data_dir $dir_pattern
|
|
125
|
+
# db_input high drumee/data_dir || true
|
|
126
|
+
# db_go
|
|
127
|
+
# db_get drumee/data_dir
|
|
128
|
+
# is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
129
|
+
# while [ "$is_valid" != "" ]
|
|
130
|
+
# do
|
|
131
|
+
# db_input high drumee/data_dir || true
|
|
132
|
+
# db_go
|
|
133
|
+
# db_get drumee/data_dir
|
|
134
|
+
# is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
135
|
+
# done
|
|
136
|
+
export DRUMEE_DATA_DIR=$RET
|
|
137
|
+
|
|
138
|
+
# BACKUP_LOCATION
|
|
139
|
+
db_input high drumee/backup_location || true
|
|
140
|
+
db_go
|
|
141
|
+
db_get drumee/backup_location
|
|
142
|
+
|
|
143
|
+
export BACKUP_LOCATION=$RET
|
|
144
|
+
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#set -e
|
|
3
|
+
|
|
4
|
+
# Source debconf library
|
|
5
|
+
. /usr/share/debconf/confmodule
|
|
6
|
+
|
|
7
|
+
echo "Installing Drumee from Debian Packages"
|
|
8
|
+
script_dir=$(dirname $(readlink -f $0))
|
|
9
|
+
|
|
10
|
+
. ${script_dir}/functions
|
|
11
|
+
|
|
12
|
+
db_input high drumee/reinstall || true
|
|
13
|
+
db_go
|
|
14
|
+
db_get drumee/reinstall
|
|
15
|
+
if [ $RET = "quit" ]; then
|
|
16
|
+
exit 0
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
db_input high drumee/description || true
|
|
20
|
+
|
|
21
|
+
# DRUMEE_DOMAIN_NAME
|
|
22
|
+
dom_pattern="^([a-zA-Z0-9_\-]+)(\.[a-zA-Z0-9_\-]+)*$"
|
|
23
|
+
db_input high drumee/domain || true
|
|
24
|
+
db_go
|
|
25
|
+
db_get drumee/domain
|
|
26
|
+
is_valid=$(echo $RET | grep -E "$dom_pattern")
|
|
27
|
+
while [ "$is_valid" = "" ]
|
|
28
|
+
do
|
|
29
|
+
db_input high drumee/domain || true
|
|
30
|
+
db_go
|
|
31
|
+
db_get drumee/domain
|
|
32
|
+
is_valid=$(echo $RET | grep -E "$dom_pattern")
|
|
33
|
+
done
|
|
34
|
+
export DRUMEE_DOMAIN_NAME=$RET
|
|
35
|
+
|
|
36
|
+
if [ "$DRUMEE_DOMAIN_NAME" = "local" ]; then
|
|
37
|
+
db_input high drumee/local_mode || true
|
|
38
|
+
db_go
|
|
39
|
+
db_get drumee/local_mode
|
|
40
|
+
LOCAL_MODE=$RET
|
|
41
|
+
else
|
|
42
|
+
db_input high drumee/services || true
|
|
43
|
+
db_go
|
|
44
|
+
db_get drumee/services
|
|
45
|
+
SERVICES=$RET
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# PUBLIC_IP4
|
|
49
|
+
ip4_pattern="^([0-9]{1,3})(\.[0-9]{1,3}){3}$"
|
|
50
|
+
db_input high drumee/public_ip4 || true
|
|
51
|
+
db_go
|
|
52
|
+
db_get drumee/public_ip4
|
|
53
|
+
is_valid=$(echo $RET | grep -E "$ip4_pattern")
|
|
54
|
+
while [ "$is_valid" = "" ]
|
|
55
|
+
do
|
|
56
|
+
db_input high drumee/public_ip4 || true
|
|
57
|
+
db_go
|
|
58
|
+
db_get drumee/public_ip4
|
|
59
|
+
is_valid=$(echo $RET | grep -E "$ip4_pattern")
|
|
60
|
+
done
|
|
61
|
+
export PUBLIC_IP4=$RET
|
|
62
|
+
|
|
63
|
+
# PUBLIC_IP6
|
|
64
|
+
ip6_pattern="^([[:xdigit:]]{1,4})(:[[:xdigit:]]{0,4})*$"
|
|
65
|
+
db_input high drumee/public_ip6 || true
|
|
66
|
+
db_go
|
|
67
|
+
db_get drumee/public_ip6
|
|
68
|
+
is_valid=$(echo $RET | grep -E "$ip6_pattern")
|
|
69
|
+
while [ "$is_valid" = "" ]
|
|
70
|
+
do
|
|
71
|
+
db_input high drumee/public_ip6 || true
|
|
72
|
+
db_go
|
|
73
|
+
db_get drumee/public_ip6
|
|
74
|
+
is_valid=$(echo $RET | grep -E "$ip6_pattern")
|
|
75
|
+
done
|
|
76
|
+
export PUBLIC_IP6=$RET
|
|
77
|
+
|
|
78
|
+
# ADMIN_EMAIL
|
|
79
|
+
email_pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$"
|
|
80
|
+
db_input high drumee/admin_email || true
|
|
81
|
+
db_go
|
|
82
|
+
db_get drumee/admin_email
|
|
83
|
+
is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
84
|
+
while [ "$is_valid" = "" ]
|
|
85
|
+
do
|
|
86
|
+
db_input high drumee/admin_email || true
|
|
87
|
+
db_go
|
|
88
|
+
db_get drumee/admin_email
|
|
89
|
+
is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
90
|
+
done
|
|
91
|
+
export ADMIN_EMAIL=$RET
|
|
92
|
+
|
|
93
|
+
# ACME_EMAIL_ACCOUNT
|
|
94
|
+
db_input high drumee/acme_email_account || true
|
|
95
|
+
db_go
|
|
96
|
+
db_get drumee/acme_email_account
|
|
97
|
+
if [ "$RET" = "" ]; then
|
|
98
|
+
export ACME_EMAIL_ACCOUNT=$ADMIN_EMAIL
|
|
99
|
+
else
|
|
100
|
+
is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
101
|
+
while [ "$is_valid" = "" ]
|
|
102
|
+
do
|
|
103
|
+
db_input high drumee/acme_email_account || true
|
|
104
|
+
db_go
|
|
105
|
+
db_get drumee/acme_email_account
|
|
106
|
+
is_valid=$(echo $RET | grep -E "$email_pattern")
|
|
107
|
+
done
|
|
108
|
+
export ACME_EMAIL_ACCOUNT=$RET
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
# DRUMEE_DB_DIR
|
|
112
|
+
dir_pattern='^/+(usr|bin|sys|proc|tmp|etc|lib.*|boot|dev|sbin|opt|media|mnt|vmlinuz.*|lost.+|snap|root|run|initrd.*)'
|
|
113
|
+
db_input high drumee/db_dir || true
|
|
114
|
+
db_go
|
|
115
|
+
db_get drumee/db_dir
|
|
116
|
+
is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
117
|
+
while [ "$is_valid" != "" ]
|
|
118
|
+
do
|
|
119
|
+
db_input high drumee/db_dir || true
|
|
120
|
+
db_go
|
|
121
|
+
db_get drumee/db_dir
|
|
122
|
+
is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
123
|
+
done
|
|
124
|
+
export DRUMEE_DB_DIR=$RET
|
|
125
|
+
|
|
126
|
+
# DRUMEE_DATA_DIR
|
|
127
|
+
db_input high drumee/data_dir || true
|
|
128
|
+
db_go
|
|
129
|
+
db_get drumee/data_dir
|
|
130
|
+
is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
131
|
+
while [ "$is_valid" != "" ]
|
|
132
|
+
do
|
|
133
|
+
db_input high drumee/data_dir || true
|
|
134
|
+
db_go
|
|
135
|
+
db_get drumee/data_dir
|
|
136
|
+
is_valid=$(echo $RET | grep -E "$dir_pattern")
|
|
137
|
+
done
|
|
138
|
+
export DRUMEE_DATA_DIR=$RET
|
|
139
|
+
|
|
140
|
+
# BACKUP_LOCATION
|
|
141
|
+
db_input high drumee/backup_location || true
|
|
142
|
+
db_go
|
|
143
|
+
db_get drumee/backup_location
|
|
144
|
+
|
|
145
|
+
export BACKUP_LOCATION=$RET
|
|
146
|
+
|
|
147
|
+
db_stop
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#set -e
|
|
3
|
+
|
|
4
|
+
. /usr/share/debconf/confmodule
|
|
5
|
+
script_dir=$(dirname $(readlink -f $0))
|
|
6
|
+
|
|
7
|
+
. ${script_dir}/utils/prompt.sh
|
|
8
|
+
|
|
9
|
+
db_input high drumee/reinstall || true
|
|
10
|
+
db_go
|
|
11
|
+
db_get drumee/reinstall
|
|
12
|
+
echo QQQQ $RET
|
|
13
|
+
export MENU_RET=$RET
|
|
14
|
+
|
|
15
|
+
db_stop
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
jitsi-meet-turnserver jitsi-meet/cert-choice string Generate a new self-signed certificate
|
|
2
|
+
jitsi-meet-turnserver jitsi-meet-turnserver/jvb-hostname string jitsi.meet
|
|
3
|
+
jicofo jitsi-videobridge/jvb-hostname string jitsi.meet
|
|
4
|
+
jitsi-meet-prosody jitsi-meet-prosody/jvb-hostname string jitsi.meet
|
|
5
|
+
jitsi-meet-web-config jitsi-meet/jvb-hostname string jitsi.meet
|
|
6
|
+
jitsi-meet-web-config jitsi-meet/cert-choice string Generate a new self-signed certificate
|
|
7
|
+
jitsi-meet-web-config jitsi-videobridge/jvb-hostname string jitsi.meet
|
|
8
|
+
jitsi-meet-web-config jitsi-meet/jaas-choice boolean false
|
|
9
|
+
jitsi-videobridge2 jitsi-videobridge/jvb-hostname string jitsi.meet
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
echo "Configuring Drumee Infrastructure"
|
|
6
|
+
script_dir=$(dirname $(readlink -f $0))
|
|
7
|
+
node_dir=$(dirname $script_dir)
|
|
8
|
+
|
|
9
|
+
$script_dir/init/mail
|
|
10
|
+
|
|
11
|
+
node $node_dir/index.js
|
|
12
|
+
|
|
13
|
+
if [ ! -f /etc/drumee/drumee.sh ]; then
|
|
14
|
+
echo Could not run Drumee without proper settings
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
source /etc/drumee/drumee.sh
|
|
19
|
+
if [ -d /etc/cron.d/drumee ]; then
|
|
20
|
+
crontab /etc/cron.d/drumee
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
source $infra_helper/utils/misc
|
|
25
|
+
source $infra_helper/utils/jitsi
|
|
26
|
+
|
|
27
|
+
install_jitsi
|
|
28
|
+
|
|
29
|
+
protect_dir $DRUMEE_RUNTIME_DIR "no" "mkdir"
|
|
30
|
+
protect_dir $DRUMEE_DATA_DIR "yes" "mkdir"
|
|
31
|
+
cd $DRUMEE_DATA_DIR
|
|
32
|
+
|
|
33
|
+
for d in mfs tmp; do
|
|
34
|
+
protect_dir "$DRUMEE_DATA_DIR/$d" "yes"
|
|
35
|
+
done
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
LOG_DIR=$DRUMEE_SERVER_HOME/.pm2/logs
|
|
39
|
+
|
|
40
|
+
touch $DRUMEE_DATA_DIR/mfs/dont-remove-this-dir
|
|
41
|
+
chmod a-w $DRUMEE_DATA_DIR/mfs/dont-remove-this-dir
|
|
42
|
+
|
|
43
|
+
protect_dir $DRUMEE_STATIC_DIR
|
|
44
|
+
protect_dir /etc/drumee
|
|
45
|
+
protect_dir $LOG_DIR "yes"
|
|
46
|
+
protect_dir $DRUMEE_CACHE_DIR
|
|
47
|
+
protect_dir $DRUMEE_TMP_DIR "yes"
|
|
48
|
+
protect_dir $DRUMEE_SERVER_HOME
|
|
49
|
+
protect_dir $DRUMEE_EXPORT_DIR
|
|
50
|
+
protect_dir $DRUMEE_IMPORT_DIR
|
|
51
|
+
|
|
52
|
+
$infra_helper/init/named
|
|
53
|
+
$infra_helper/init/acme
|
|
54
|
+
|
|
55
|
+
clean_vendor_files
|
|
56
|
+
setup_dirs
|
|
57
|
+
setup_prosody
|
|
58
|
+
write_version
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
echo "Configuring Drumee Infrastructure"
|
|
6
|
+
script_dir=$(dirname $(readlink -f $0))
|
|
7
|
+
node_dir=$(dirname $script_dir)
|
|
8
|
+
|
|
9
|
+
$script_dir/init/mail
|
|
10
|
+
|
|
11
|
+
node $node_dir/index.js
|
|
12
|
+
|
|
13
|
+
if [ ! -f /etc/drumee/drumee.sh ]; then
|
|
14
|
+
echo Could not run Drumee without proper settings
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
source /etc/drumee/drumee.sh
|
|
19
|
+
if [ -d /etc/cron.d/drumee ]; then
|
|
20
|
+
crontab /etc/cron.d/drumee
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
source $infra_helper/utils/misc
|
|
25
|
+
source $infra_helper/utils/jitsi
|
|
26
|
+
|
|
27
|
+
install_jitsi
|
|
28
|
+
|
|
29
|
+
protect_dir $DRUMEE_RUNTIME_DIR "no" "mkdir"
|
|
30
|
+
protect_dir $DRUMEE_DATA_DIR "yes" "mkdir"
|
|
31
|
+
cd $DRUMEE_DATA_DIR
|
|
32
|
+
|
|
33
|
+
for d in mfs tmp; do
|
|
34
|
+
protect_dir "$DRUMEE_DATA_DIR/$d" "yes"
|
|
35
|
+
done
|
|
36
|
+
|
|
37
|
+
LOG_DIR=$DRUMEE_SERVER_HOME/.pm2/logs
|
|
38
|
+
|
|
39
|
+
touch $DRUMEE_DATA_DIR/mfs/dont-remove-this-dir
|
|
40
|
+
chmod a-w $DRUMEE_DATA_DIR/mfs/dont-remove-this-dir
|
|
41
|
+
|
|
42
|
+
protect_dir $DRUMEE_STATIC_DIR
|
|
43
|
+
protect_dir /etc/drumee
|
|
44
|
+
protect_dir $LOG_DIR "yes"
|
|
45
|
+
protect_dir $DRUMEE_CACHE_DIR
|
|
46
|
+
protect_dir $DRUMEE_TMP_DIR "yes"
|
|
47
|
+
protect_dir $DRUMEE_SERVER_HOME
|
|
48
|
+
protect_dir $DRUMEE_EXPORT_DIR
|
|
49
|
+
protect_dir $DRUMEE_IMPORT_DIR
|
|
50
|
+
|
|
51
|
+
$infra_helper/init/named
|
|
52
|
+
$infra_helper/init/acme
|
|
53
|
+
|
|
54
|
+
clean_vendor_files
|
|
55
|
+
setup_dirs
|
|
56
|
+
setup_prosody
|
|
57
|
+
write_version
|