.gitlab-ci.yml에 Python 테스트 추가 및 cloud-init 스크립트 생성, policy_routing.py에서 서비스 재시작 명령 추가

This commit is contained in:
2025-05-28 15:38:59 +09:00
parent 2e67e8f777
commit 4be94ade77
4 changed files with 75 additions and 0 deletions

View File

@@ -847,6 +847,7 @@ SUBSYSTEM=="net", ACTION=="move", RUN+="{SCRIPT_PATH} refresh"
subprocess.run(["udevadm", "control", "--reload-rules"], check=True)
subprocess.run(["systemctl", "daemon-reload"], check=True)
subprocess.run(["systemctl", "enable", "policy-routing"], check=True)
subprocess.run(["systemctl", "restart", "policy-routing"], check=True)
if not os.path.exists(CONFIG_FILE):
with open(CONFIG_FILE, "w") as f: