SPB Git

Repository Public

install-geo-refresh.sh 2.9 KB 59 lines shellscript

1#!/bin/bash2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : KA Maps Engine8# File             : server/deploy/install-geo-refresh.sh9# Module           : server10# Repository       : https://git.spboucher.ai/ka-maps-engine11# Created          : 2026-12-0112# Last Modified    : 2026-12-0113#14# Author           : Simon-Pierre Boucher15# Position         : Professor of Finance16# Institution      : Université du Québec en Outaouais (UQO)17# Organization     : SP Boucher18# Website          : https://spboucher.ai19# Git              : https://git.spboucher.ai20#21# Preferred Contact: support@spboucher.ai22# Technical Contact: dev@spboucher.ai23# Security/Admin   : admin@spboucher.ai24#25# Copyright (c) 202626# Simon-Pierre Boucher27# All rights reserved where applicable. This file is governed by the28# applicable project license, copyright notices and relevant law.29# Existing third-party rights and notices remain unaffected.30#31# License          : None specified (no license file in this repository)32#33# Do not embed credentials, private keys, access tokens,34# certificates or confidential personal information.35#36# =============================================================================37# END OF SP BOUCHER SOURCE HEADER38# =============================================================================3940# KA Maps — installe le rafraîchissement planifié de km-geo : copie du pipeline et du jeu de test dans /opt/kamaps/geo41# (l'utilisateur de service kamaps ne lit pas le clone), unités systemd, droits sur les dossiers de données.42set -euo pipefail43HERE=$(cd "$(dirname "$0")" && pwd); SERVER=$(dirname "$HERE")44sudo install -d -o root -g root -m 755 /opt/kamaps/geo/pipeline /opt/kamaps/geo/tests45sudo rsync -a --delete --chown=root:root --exclude '__pycache__' "$SERVER/pipeline/geo/" /opt/kamaps/geo/pipeline/46sudo install -m 644 "$SERVER/km-geo/tests/eval_geo.py" "$SERVER/km-geo/tests/cases_manual.json" \47     "$SERVER/km-geo/tests/geocode_sample.tsv" "$SERVER/km-geo/tests/gate.json" /opt/kamaps/geo/tests/48sudo chmod 755 /opt/kamaps/geo/pipeline/*.sh49# Données : le service kamaps écrit dans src/geo et graph50sudo chown -R kamaps:kamaps /var/lib/kamaps/src/geo /var/lib/kamaps/graph51sudo chmod -R g+rwX /var/lib/kamaps/src/geo /var/lib/kamaps/graph52for u in kamaps-geo-osm.service kamaps-geo-osm.path kamaps-geo-osm.timer kamaps-geo-full.service kamaps-geo-full.timer; do53  sudo install -m 644 "$HERE/$u" /etc/systemd/system/$u54done55sudo systemctl daemon-reload56sudo systemctl enable -q --now kamaps-geo-osm.path kamaps-geo-osm.timer kamaps-geo-full.timer57systemctl list-timers --all --no-pager | grep kamaps-geo || true58systemctl is-active kamaps-geo-osm.path59
Files main
Menu

Theme