diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 3b9c42b..98e0b57 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -46,8 +46,8 @@ jobs: # Create temporary packaging directory mkdir -p package/usr/local/bin mkdir -p package/etc/systemd/system - # Copy main.py as the executable and rename if needed - cp src/main.py package/usr/local/bin/magicfw + # Copy magicfw.py as the executable and rename if needed + cp src/magicfw.py package/usr/local/bin/magicfw chmod +x package/usr/local/bin/magicfw # Copy the systemd service file cp systemd/magicfw.service package/etc/systemd/system/ diff --git a/src/main.py b/src/magicfw.py similarity index 99% rename from src/main.py rename to src/magicfw.py index 619a415..182103a 100644 --- a/src/main.py +++ b/src/magicfw.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import os import json import logging diff --git a/systemd/magicfw.service b/systemd/magicfw.service index bede43d..a769714 100644 --- a/systemd/magicfw.service +++ b/systemd/magicfw.service @@ -10,7 +10,7 @@ StartLimitBurst=10 Type=exec Restart=on-failure RestartSec=5s -ExecStart=/usr/bin/python3 /opt/docker_magicfw.py +ExecStart=/usr/local/bin/magicfw # Environment variables (customize as needed) Environment=LOG_LEVEL=INFO