mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-18 05:50:31 +00:00
[V2+] r'string
Signed-off-by: Charles Le Maux <charles.le-maux@epitech.eu>
This commit is contained in:
parent
61af7c6920
commit
34267cda12
@ -89,8 +89,7 @@ def append_stream_config(port, subdomain, config_file_path='/etc/nginx/sites-ava
|
|||||||
|
|
||||||
|
|
||||||
def remove_stream_config(port, subdomain, config_file_path='/etc/nginx/sites-available/servii.fr'):
|
def remove_stream_config(port, subdomain, config_file_path='/etc/nginx/sites-available/servii.fr'):
|
||||||
pattern = (r'stream {{\s*server {{\s*listen 25565;\s*listen \[\(::\]\):'
|
pattern = (r'stream {{\s*server {{\s*listen 25565;\s*listen \[\(::\]\):25565;\s*server_name {}.servii\.fr;\s*proxy_pass 127\.0\.0\.1:{};\s*}}}\n'
|
||||||
r'25565;\s*server_name {}.servii\.fr;\s*proxy_pass 127\.0\.0\.1:{};\s*}}}\n'
|
|
||||||
.format(re.escape(subdomain), port))
|
.format(re.escape(subdomain), port))
|
||||||
with open(config_file_path, 'r') as file:
|
with open(config_file_path, 'r') as file:
|
||||||
content = file.read()
|
content = file.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user