Don't change web config repeatedly

This commit is contained in:
Bob Mottram 2017-01-01 21:05:07 +00:00
parent eab55a3c49
commit 796560972b
2 changed files with 116 additions and 112 deletions

View File

@ -59,6 +59,7 @@ function matrix_nginx {
# append the matrix server to the web site config
matrix_nginx_site=/etc/nginx/sites-available/$DEFAULT_DOMAIN_NAME
if ! grep "# End of Matrix Server" $matrix_nginx_site; then
if [[ $ONION_ONLY == "no" ]]; then
echo '# Matrix Server' >> $matrix_nginx_site
echo 'server {' >> $matrix_nginx_site
@ -164,6 +165,7 @@ function matrix_nginx {
echo ' }' >> $matrix_nginx_site
echo '}' >> $matrix_nginx_site
echo '# End of Matrix Server' >> $matrix_nginx_site
fi
systemctl restart nginx
systemctl restart turn

View File

@ -65,6 +65,7 @@ function install_turn {
# append the matrix server to the web site config
turn_nginx_site=/etc/nginx/sites-available/$DEFAULT_DOMAIN_NAME
if ! grep "# End of TURN Server" $turn_nginx_site; then
if [[ $ONION_ONLY == "no" ]]; then
echo '# TURN Server' >> $turn_nginx_site
echo 'server {' >> $turn_nginx_site
@ -120,6 +121,7 @@ function install_turn {
echo ' }' >> $turn_nginx_site
echo '}' >> $turn_nginx_site
echo '# End of TURN Server' >> $turn_nginx_site
fi
export DEBIAN_FRONTEND=noninteractive
apt-get -yq install coreutils coturn \