From 45df827cb0d040e0d1b4f0378f386da37df1ca12 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Wed, 8 Oct 2025 01:32:54 +0200 Subject: [PATCH] work --- .gitignore | 1 + init-server.py | 10 +++++----- ssh_lib/tasks_http_host.py | 6 ++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index b5141ee..06ea46d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ venv /pnpm-lock.yaml /deploy-*.sh +tmp.txt diff --git a/init-server.py b/init-server.py index c8e00d5..f6feef0 100755 --- a/init-server.py +++ b/init-server.py @@ -76,12 +76,12 @@ def http_host_autoupdate(hostname, user, port, noninteractive): c.sudo('rm -f /etc/cron.d/ofm_http_host') - prepare_shared(c) + # prepare_shared(c) prepare_http_host(c) - - run_http_host_sync(c) # disable for first install if you don't want to wait - - put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/') + # + # run_http_host_sync(c) # disable for first install if you don't want to wait + # + # put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/') @cli.command() diff --git a/ssh_lib/tasks_http_host.py b/ssh_lib/tasks_http_host.py index 74124c0..1383c3a 100644 --- a/ssh_lib/tasks_http_host.py +++ b/ssh_lib/tasks_http_host.py @@ -16,8 +16,6 @@ def prepare_http_host(c): kernel_somaxconn65k(c) kernel_limits1m(c) - upload_config_and_certs(c) - nginx(c) certbot(c) @@ -30,9 +28,10 @@ def prepare_http_host(c): c.sudo(f'chown nginx:nginx {config.http_host_dir}/logs_nginx') upload_http_host_files(c) - c.sudo(f'{config.venv_bin}/pip install -e {config.http_host_bin} --use-pep517') + upload_config_and_certs(c) + def upload_config_and_certs(c): if not config.local_config_jsonc.is_file(): @@ -83,7 +82,6 @@ def upload_config_and_certs(c): remote_cert_path = f'/data/nginx/certs/ofm-{domain_data["slug"]}.cert' remote_key_path = f'/data/nginx/certs/ofm-{domain_data["slug"]}.key' - # TODO fix permissions put(c, local_cert_path, remote_cert_path) put(c, local_key_path, remote_key_path)