Add git-based auto-update for Linux deployment

- install.sh now clones from git instead of copying files
- Service runs git pull on restart for automatic updates
- Support config.local.json for production settings (gitignored)
- kao.py prefers config.local.json when present

To update production: push changes, then 'sudo systemctl restart kao'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 17:34:51 -06:00
parent 81c23308cc
commit 36aecb1fc9
4 changed files with 107 additions and 68 deletions

12
kao.py
View File

@@ -242,10 +242,18 @@ def main():
else:
config_path = sys.argv[1]
# Resolve config path
# Resolve config path - prefer config.local.json if it exists
base_dir = Path(__file__).parent
config_path = Path(config_path)
if not config_path.is_absolute():
config_path = Path(__file__).parent / config_path
# Check for local config override first
local_config = base_dir / "config.local.json"
if local_config.exists() and config_path.name == "config.json":
config_path = local_config
print(f"Using local config: {config_path}")
else:
config_path = base_dir / config_path
if not config_path.exists():
print(f"Config file not found: {config_path}")