feat(api): enhance install script for dependency management and systemd integration
- 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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user