Compare commits
No commits in common. "ecd289ac705628b660f578009bc3e5bbefbc6a3e" and "8e4e0e548e4c25d1d9c4fdcc255352bb61855fa1" have entirely different histories.
ecd289ac70
...
8e4e0e548e
@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
sqldb="ejabberd"
|
sqldb="ejabberd"
|
||||||
sqlusername="ejabberd"
|
sqlusername="ejabberd"
|
||||||
ejabberdtlsdir="/var/lib/ejabberd"
|
|
||||||
|
|
||||||
pacman -S --noconfirm ejabberd
|
pacman -S --noconfirm ejabberd
|
||||||
|
|
||||||
@ -9,7 +8,6 @@ read -p "Enter your domain: " domain
|
|||||||
|
|
||||||
domains=("conference.$domain" "proxy.$domain" "pubsub.$domain" "upload.$domain")
|
domains=("conference.$domain" "proxy.$domain" "pubsub.$domain" "upload.$domain")
|
||||||
certdirs=("/etc/letsencrypt/live/$domain" "/etc/letsencrypt/live/${domains[0]}" "/etc/letsencrypt/live/${domains[1]}" "/etc/letsencrypt/live/${domains[2]}" "/etc/letsencrypt/live/${domains[3]}")
|
certdirs=("/etc/letsencrypt/live/$domain" "/etc/letsencrypt/live/${domains[0]}" "/etc/letsencrypt/live/${domains[1]}" "/etc/letsencrypt/live/${domains[2]}" "/etc/letsencrypt/live/${domains[3]}")
|
||||||
ejabberdcertdirs=("${ejabberdtlsdir}/${domain}.pem" "${ejabberdtlsdir}/${domains[0]}.pem" "${ejabberdtlsdir}/${domains[1]}.pem" "${ejabberdtlsdir}/${domains[2]}.pem" "${ejabberdtlsdir}/${domains[3]}.pem")
|
|
||||||
|
|
||||||
index=0
|
index=0
|
||||||
|
|
||||||
@ -54,22 +52,6 @@ while read -p "$sqlpassword is this correct? (y/n): " confirm; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
index=0
|
|
||||||
|
|
||||||
echo "Creating ejabberd TLS cert files..." # we have to create special TLS
|
|
||||||
# certs just for ejabberd because
|
|
||||||
# it's a special snowflake who
|
|
||||||
# reads the guardian
|
|
||||||
for vhost in ${certdirs[@]}; do # for each vhost
|
|
||||||
# concatenate the private key and fullchain into one file
|
|
||||||
cat ${certdirs[$index]}/privkey.pem ${certdirs[$index]}/fullchain.pem > ${ejabberdtlsdir}/${vhost}.pem
|
|
||||||
# update file perms
|
|
||||||
chown jabber:jabber ${ejabberdtlsdir}/${vhost}.pem
|
|
||||||
chmod 700 ${ejabberdtlsdir}/${vhost}.pem
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Setting up ejabberd SQL database..."
|
|
||||||
|
|
||||||
mariadb -e "CREATE DATABASE $sqldb; CREATE USER $sqlusername@localhost IDENTIFIED BY '$sqlpassword'; GRANT ALL ON ejabberd.* TO $sqlusername@localhost"
|
mariadb -e "CREATE DATABASE $sqldb; CREATE USER $sqlusername@localhost IDENTIFIED BY '$sqlpassword'; GRANT ALL ON ejabberd.* TO $sqlusername@localhost"
|
||||||
|
|
||||||
echo """
|
echo """
|
||||||
@ -613,11 +595,10 @@ acme:
|
|||||||
auto: false
|
auto: false
|
||||||
|
|
||||||
certfiles:
|
certfiles:
|
||||||
- ${ejabberdtlsdirs[0]}
|
- ${domains[0]}
|
||||||
- ${ejabberdtlsdirs[1]}
|
- ${domains[1]}
|
||||||
- ${ejabberdtlsdirs[2]}
|
- ${domains[2]}
|
||||||
- ${ejabberdtlsdirs[3]}
|
- ${domains[3]}
|
||||||
- ${ejabberdtlsdirs[4]}
|
|
||||||
|
|
||||||
c2s_ciphers: TLS_CIPHERS
|
c2s_ciphers: TLS_CIPHERS
|
||||||
c2s_protocol_options: TLS_OPTIONS
|
c2s_protocol_options: TLS_OPTIONS
|
||||||
@ -749,7 +730,7 @@ api_permissions:
|
|||||||
|
|
||||||
shaper:
|
shaper:
|
||||||
normal:
|
normal:
|
||||||
rate: 1000000 # monal (iOS XMPP client) only has 30 seconds to load messages (of which there could be many) from a push notification, hence the high rate
|
rate: 1000000 # monal (iOS XMPP client) only has 30 seconds to load messages (of which there could be many) from a push notification, hence the high rate
|
||||||
burst_size: 5000000 # see above
|
burst_size: 5000000 # see above
|
||||||
fast: 50000000
|
fast: 50000000
|
||||||
|
|
||||||
@ -858,11 +839,8 @@ modules:
|
|||||||
### End:
|
### End:
|
||||||
### vim: set filetype=yaml tabstop=8""" > /etc/ejabberd/ejabberd.yml
|
### vim: set filetype=yaml tabstop=8""" > /etc/ejabberd/ejabberd.yml
|
||||||
|
|
||||||
chown jabber:jabber /etc/ejabberd/ejabberd.yml
|
|
||||||
chmod 700 /etc/ejabberd/ejabberd.yml
|
chmod 700 /etc/ejabberd/ejabberd.yml
|
||||||
|
|
||||||
systemctl start ejabberd && systemctl enable ejabberd
|
|
||||||
|
|
||||||
echo "Installing nginx upload vhost file..."
|
echo "Installing nginx upload vhost file..."
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
|
Loading…
Reference in New Issue
Block a user