Don't change web config repeatedly
This commit is contained in:
parent
eab55a3c49
commit
796560972b
|
@ -59,6 +59,7 @@ function matrix_nginx {
|
||||||
|
|
||||||
# append the matrix server to the web site config
|
# append the matrix server to the web site config
|
||||||
matrix_nginx_site=/etc/nginx/sites-available/$DEFAULT_DOMAIN_NAME
|
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
|
if [[ $ONION_ONLY == "no" ]]; then
|
||||||
echo '# Matrix Server' >> $matrix_nginx_site
|
echo '# Matrix Server' >> $matrix_nginx_site
|
||||||
echo '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 '}' >> $matrix_nginx_site
|
echo '}' >> $matrix_nginx_site
|
||||||
echo '# End of Matrix Server' >> $matrix_nginx_site
|
echo '# End of Matrix Server' >> $matrix_nginx_site
|
||||||
|
fi
|
||||||
|
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
systemctl restart turn
|
systemctl restart turn
|
||||||
|
|
|
@ -65,6 +65,7 @@ function install_turn {
|
||||||
|
|
||||||
# append the matrix server to the web site config
|
# append the matrix server to the web site config
|
||||||
turn_nginx_site=/etc/nginx/sites-available/$DEFAULT_DOMAIN_NAME
|
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
|
if [[ $ONION_ONLY == "no" ]]; then
|
||||||
echo '# TURN Server' >> $turn_nginx_site
|
echo '# TURN Server' >> $turn_nginx_site
|
||||||
echo '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 '}' >> $turn_nginx_site
|
echo '}' >> $turn_nginx_site
|
||||||
echo '# End of TURN Server' >> $turn_nginx_site
|
echo '# End of TURN Server' >> $turn_nginx_site
|
||||||
|
fi
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt-get -yq install coreutils coturn \
|
apt-get -yq install coreutils coturn \
|
||||||
|
|
Loading…
Reference in New Issue