|
|
|
|
214
|
echo -e "Generate SSL cert\n"
|
214
|
echo -e "Generate SSL cert\n"
|
215
|
certbot --nginx -d ${DOMAIN} --agree-tos --register-unsafely-without-email
|
215
|
certbot --nginx -d ${DOMAIN} --agree-tos --register-unsafely-without-email
|
216
|
|
216
|
|
217
|
-# Add certbot SSL cert renewal to crontab
|
|
|
218
|
-crontab -l | { cat; echo '43 6 * * * certbot renew --post-hook "systemctl reload nginx"'; } | crontab -
|
|
|
219
|
-
|
|
|
220
|
# Add custom 8448 SSL port for Matrix Federation
|
217
|
# Add custom 8448 SSL port for Matrix Federation
|
221
|
sed -i '/listen\ 443\ ssl/a\\tlisten\ 8448\ ssl\;' /etc/nginx/sites-enabled/default
|
218
|
sed -i '/listen\ 443\ ssl/a\\tlisten\ 8448\ ssl\;' /etc/nginx/sites-enabled/default
|
222
|
nginx -s reload
|
219
|
nginx -s reload
|
|
|
|
|
227
|
# Finally, start services
|
224
|
# Finally, start services
|
228
|
# Ensuring the DB dir is clean before bootstrapping
|
225
|
# Ensuring the DB dir is clean before bootstrapping
|
229
|
systemctl enable --now matrix.service
|
226
|
systemctl enable --now matrix.service
|
|
|
227
|
+
|
|
|
228
|
+# Add certbot SSL cert renewal to crontab
|
|
|
229
|
+crontab -l | { cat; echo '43 6 * * * certbot renew --post-hook "systemctl reload nginx"'; } | crontab -
|