fix auto-update

This commit is contained in:
Zsolt Ero
2024-09-10 01:46:44 +02:00
parent 0bd2a19d1c
commit eb2d82d764
9 changed files with 35 additions and 34 deletions

View File

@@ -47,7 +47,7 @@ def prepare_venv(c):
sudo_cmd(c, f'cd {OFM_DIR} && source prepare-virtualenv.sh')
def prepare_tile_gen(c):
def prepare_tile_gen(c, *, enable_cron):
c.sudo('rm -f /etc/cron.d/ofm_tile_gen')
install_planetiler(c)
@@ -76,7 +76,8 @@ def prepare_tile_gen(c):
c.sudo('chown ofm:ofm /data/ofm/tile_gen/{,*}')
c.sudo(f'chown ofm:ofm -R {TILE_GEN_BIN}')
put(c, MODULES_DIR / 'tile_gen' / 'cron.d' / 'ofm_tile_gen', '/etc/cron.d/')
if enable_cron:
put(c, MODULES_DIR / 'tile_gen' / 'cron.d' / 'ofm_tile_gen', '/etc/cron.d/')
def prepare_http_host(c):