From 407d534801a55e2995e67e317bcc4c28904d0428 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Fri, 10 Oct 2025 00:54:09 +0200 Subject: [PATCH] work --- config/config.schema.json | 2 +- init-server.py | 5 ++++- modules/http_host/http_host_lib/sync.py | 4 ++++ package.json | 2 +- ssh_lib/tasks_tile_gen.py | 4 +++- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/config/config.schema.json b/config/config.schema.json index 1ded930..88dfb90 100644 --- a/config/config.schema.json +++ b/config/config.schema.json @@ -21,7 +21,7 @@ "description": "Skip the full planet download, useful for testing" } }, - "required": ["domains", "servers", "skip_planet"], + "required": ["domains", "servers"], "definitions": { "cert-upload": { "type": "object", diff --git a/init-server.py b/init-server.py index a4ee056..43dceff 100755 --- a/init-server.py +++ b/init-server.py @@ -2,6 +2,7 @@ import os import click +import json5 from fabric import Config, Connection from ssh_lib.config import config @@ -79,7 +80,9 @@ def http_host_autoupdate(hostname, user, port, noninteractive): # prepare_shared(c) prepare_http_host(c) - run_http_host_sync(c) # disable for first install if you don't want to wait + # for the monaco run, wait for the sync to complete + if json5.loads(config.local_config_jsonc.read_text()).get('skip_planet'): + run_http_host_sync(c) put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/') diff --git a/modules/http_host/http_host_lib/sync.py b/modules/http_host/http_host_lib/sync.py index cf69e3f..350327b 100644 --- a/modules/http_host/http_host_lib/sync.py +++ b/modules/http_host/http_host_lib/sync.py @@ -18,6 +18,10 @@ def full_sync(force=False): assert_linux() assert_sudo() + # if it's a manual/forced run, we clean up old/deleted mounts + if force: + clean_up_mounts(config.mnt_dir) + # start versions_changed = fetch_version_files() diff --git a/package.json b/package.json index d33c5e9..c79e0f0 100644 --- a/package.json +++ b/package.json @@ -4,5 +4,5 @@ "prettier": "^3.6.2", "prettier-plugin-astro": "^0.14.0" }, - "packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1" + "packageManager": "pnpm@10.18.2" } diff --git a/ssh_lib/tasks_tile_gen.py b/ssh_lib/tasks_tile_gen.py index 2834bee..95135b3 100644 --- a/ssh_lib/tasks_tile_gen.py +++ b/ssh_lib/tasks_tile_gen.py @@ -13,7 +13,9 @@ def prepare_tile_gen(c, *, enable_cron): put_dir(c, config.local_modules_dir / 'tile_gen', config.tile_gen_bin, file_permissions='755') for dirname in ['tile_gen_lib', 'scripts']: - put_dir(c, config.local_modules_dir / 'tile_gen' / dirname, f'{config.tile_gen_bin}/{dirname}') + put_dir( + c, config.local_modules_dir / 'tile_gen' / dirname, f'{config.tile_gen_bin}/{dirname}' + ) if (config.local_config_dir / 'rclone.conf').exists(): put(