feat(api): enhance install script for dependency management and systemd integration
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m52s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped

- Refactored `install.sh` to improve package installation logic, supporting multiple package managers (apt, dnf, yum, apk).
- Added functions to ensure required packages (`curl`, `jq`, `python3`, `nftables`, `iptables`, `ipset`, `cron`) are installed only if missing.
- Implemented systemd timer support for scheduling, with fallback to cron if systemd is unavailable.
- Updated documentation to reflect changes in dependency installation and scheduling mechanisms.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-07-21 19:35:34 +07:00
co-authored by Cursor
parent d516a9a093
commit d44f1113df
2 changed files with 101 additions and 9 deletions
+2
View File
@@ -36,6 +36,8 @@ curl -fsSL https://<cp>/v1/agent/install.sh | \
Файлы: `/etc/evofw/agent.conf`, `/usr/local/sbin/evofw-firewall.sh`, timer `evofw-firewall.timer` (default 1min).
Install сам ставит зависимости через apt/dnf/yum/apk: `curl`, `jq` (или `python3`), `nftables`/`iptables`(+`ipset`). Планировщик: **systemd timer** если есть `/run/systemd/system`, иначе ставит `cron`/`cronie` и пишет crontab.
Backend auto-detect: nft → ipset → iptables.
Whitelist: nft chain policy drop + allow set. Blacklist: policy accept + deny set.