Fix order of websocket URL substitution

This commit is contained in:
DeathByDenim 2022-02-09 20:03:04 -05:00
parent 48ecd04476
commit 9171133fc6
Signed by: DeathByDenim
GPG Key ID: 4A475283D925365B
1 changed files with 2 additions and 2 deletions

View File

@ -15,10 +15,10 @@ certbot -n --nginx -d ${DOMAINNAME} -d www.${DOMAINNAME} --agree-tos -m "${letse
# Put the website files in place
cp -r "$(dirname "$0")"/../website/* /var/www/html
for file in $(grep -lR 192.168 /var/www/html/); do
sed -i $file -e s/"192\.168\.122\.229"/"${DOMAINNAME}"/g
sed -i $file -e s/"ws:\/\/"/"wss:\/\/"/g
done
for file in $(grep -lR 192.168 /var/www/html/); do
sed -i $file -e s/"ws:\/\/"/"wss:\/\/"/g
sed -i $file -e s/"192\.168\.122\.229"/"${DOMAINNAME}"/g
done
# Patch the NGINX configuration for the web sockets