mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
work
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import click
|
||||
import json5
|
||||
|
||||
from ssh_lib.cli_helpers import common_options, get_connection
|
||||
from ssh_lib.config import config
|
||||
@@ -33,7 +32,8 @@ def init_static(hostname, user, port, noninteractive):
|
||||
|
||||
@cli.command()
|
||||
@common_options
|
||||
def init_autoupdate(hostname, user, port, noninteractive):
|
||||
@click.option('--sync', is_flag=True, help='Run manual sync after init')
|
||||
def init_autoupdate(hostname, user, port, noninteractive, sync):
|
||||
if not noninteractive and not click.confirm(f'Run script on {hostname}?'):
|
||||
return
|
||||
|
||||
@@ -44,8 +44,8 @@ def init_autoupdate(hostname, user, port, noninteractive):
|
||||
prepare_shared(c)
|
||||
prepare_http_host(c)
|
||||
|
||||
# for the monaco run, wait for the sync to complete
|
||||
if json5.loads(config.local_config_jsonc.read_text()).get('skip_planet'):
|
||||
# if --sync, run manual sync
|
||||
if sync:
|
||||
run_http_host_sync(c)
|
||||
|
||||
put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/')
|
||||
|
||||
Reference in New Issue
Block a user