permissions

This commit is contained in:
Zsolt Ero
2023-12-28 19:24:18 +01:00
parent 748d24065d
commit 8b33452ca3
2 changed files with 6 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ def prepare_shared(c):
set_cpu_governor(c)
c.sudo(f'mkdir -p {REMOTE_CONFIG}')
c.sudo(f'chown ofm:ofm {REMOTE_CONFIG}')
c.sudo('chown ofm:ofm /data/ofm/.*')
prepare_venv(c)
@@ -93,7 +93,8 @@ def prepare_tile_gen(c):
owner='ofm',
)
c.sudo('chown -R ofm:ofm /data/ofm/tile_gen')
c.sudo('chown ofm:ofm /data/ofm/tile_gen/.*')
c.sudo('chown ofm:ofm -R /data/ofm/tile_gen/bin')
def prepare_http_host(c):

View File

@@ -41,6 +41,9 @@ def cli(area: str, version: str, list_versions: bool, runs_dir: Path):
sys.exit(f'Requested version is not available. Available versions:\n{all_versions_str}')
selected_version = version
if not runs_dir and not Path('/data/ofm').exists():
sys.exit('Please specify a runs dir with --runs-dir')
download(area, selected_version, runs_dir or DEFAULT_RUNS_DIR)