mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
skip_letsencrypt implemented
This commit is contained in:
@@ -17,6 +17,7 @@ def write_nginx_config():
|
|||||||
|
|
||||||
domain_le = config.ofm_config['domain_le']
|
domain_le = config.ofm_config['domain_le']
|
||||||
domain_ledns = config.ofm_config['domain_ledns']
|
domain_ledns = config.ofm_config['domain_ledns']
|
||||||
|
skip_letsencrypt = config.ofm_config['skip_letsencrypt']
|
||||||
|
|
||||||
# remove old configs and certs
|
# remove old configs and certs
|
||||||
for file in Path('/data/nginx/sites').glob('ofm_*.conf'):
|
for file in Path('/data/nginx/sites').glob('ofm_*.conf'):
|
||||||
@@ -58,6 +59,7 @@ def write_nginx_config():
|
|||||||
subprocess.run(['nginx', '-t'], check=True)
|
subprocess.run(['nginx', '-t'], check=True)
|
||||||
subprocess.run(['systemctl', 'reload', 'nginx'], check=True)
|
subprocess.run(['systemctl', 'reload', 'nginx'], check=True)
|
||||||
|
|
||||||
|
if not skip_letsencrypt:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
'certbot',
|
'certbot',
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ PLANETILER_BIN = f'{TILE_GEN_DIR}/planetiler'
|
|||||||
HTTP_HOST_BIN = f'{OFM_DIR}/http_host/bin'
|
HTTP_HOST_BIN = f'{OFM_DIR}/http_host/bin'
|
||||||
|
|
||||||
|
|
||||||
|
# Handling multiple .env files is supported
|
||||||
|
# or example ENV=test would use .env.test
|
||||||
|
|
||||||
ENV = os.getenv('ENV')
|
ENV = os.getenv('ENV')
|
||||||
if ENV:
|
if ENV:
|
||||||
env_file_name = f'.env.{ENV}'
|
env_file_name = f'.env.{ENV}'
|
||||||
|
|||||||
Reference in New Issue
Block a user