From efaebb1b3c8b20c985c8c15c0a75b5a0d5cb1779 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Wed, 3 Jan 2024 14:23:56 +0100 Subject: [PATCH] put_dir --- init-server.py | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/init-server.py b/init-server.py index b8abe74..a792a81 100755 --- a/init-server.py +++ b/init-server.py @@ -104,30 +104,19 @@ def prepare_http_host(c): def upload_https_host_files(c): c.sudo(f'mkdir -p {HTTP_HOST_BIN}') - for file in [ - 'deploy_tiles_version.py', - 'download_assets.py', - 'download_tiles.py', - 'metadata_to_tilejson.py', - 'mounter.py', - ]: - put( - c, - SCRIPTS_DIR / 'http_host' / file, - HTTP_HOST_BIN, - permissions='755', - ) + put_dir( + c, + SCRIPTS_DIR / 'host', + HTTP_HOST_BIN, + file_permissions='755', + exclude_set={'.gitignore'}, + ) - for file in [ - 'nginx_sync.py', - 'nginx_template_cf.conf', - ]: - put( - c, - SCRIPTS_DIR / 'http_host' / 'nginx_sync' / file, - f'{HTTP_HOST_BIN}/nginx_sync/{file}', - create_parent_dir=True, - ) + put_dir( + c, + SCRIPTS_DIR / 'host' / 'host_lib', + f'{HTTP_HOST_BIN}/host_lib', + ) c.sudo('chown -R ofm:ofm /data/ofm/http_host')