Documentation
¶
Overview ¶
============================================================================= NFTBan v1.73 - Installer Stale File Cleanup ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-services-cleanup" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Remove stale files, polkit rules, and legacy units from prior versions" meta:inventory.files="internal/installer/services/cleanup.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
============================================================================= NFTBan v1.73 - Installer Daemon Start ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-services-daemon" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Enable and start nftband socket+service with retry" meta:inventory.files="internal/installer/services/daemon.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="nftband.socket, nftband.service" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
============================================================================= NFTBan v1.73 - Installer Login Monitoring Enable ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-services-login" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Enable login monitoring via nftban login enable" meta:inventory.files="internal/installer/services/login.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
============================================================================= NFTBan v1.75.1 - Installer Panel Enable ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-services-panel" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Enable panel integration for detected hosting panels" meta:inventory.files="internal/installer/services/panel.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
============================================================================= NFTBan v1.76.0 - Installer systemd Helpers ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-services-systemd" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-05" meta:description="systemd-tmpfiles --create and polkit restart for installer parity" meta:inventory.files="internal/installer/services/systemd.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
============================================================================= NFTBan v1.75.1 - Installer Timer Reconciliation ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-services-timers" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Reconcile core systemd timers (enable+start)" meta:inventory.files="internal/installer/services/timers.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="/etc/nftban/nftban.conf" meta:inventory.systemd_units="nftban-maintenance.timer, nftban-health.timer, nftban-unified-exporter.timer, nftban-core-geoip.timer, nftban-core-feeds.timer, nftban-watchdog.timer, nftban-queue.timer, nftban-update-check.timer" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
============================================================================= NFTBan v1.73 - Installer Whitelist Sync ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-services-whitelist" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Run nftban sync to load whitelists and feeds after rebuild" meta:inventory.files="internal/installer/services/whitelist.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
Index ¶
- func ApplyTmpfiles(exec executor.Executor, log *logging.Logger)
- func CleanStaleFiles(exec executor.Executor, log *logging.Logger)
- func CriticalCoreTimers() []string
- func EnableLogin(exec executor.Executor, log *logging.Logger)
- func EnablePanel(exec executor.Executor, panel detect.PanelType, log *logging.Logger)
- func ReconcileTimers(exec executor.Executor, log *logging.Logger)
- func RestartPolkit(exec executor.Executor, log *logging.Logger)
- func ShouldReconcile(exec executor.Executor) bool
- func StartDaemon(exec executor.Executor, log *logging.Logger)
- func SyncWhitelist(exec executor.Executor, log *logging.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTmpfiles ¶ added in v1.76.0
ApplyTmpfiles runs systemd-tmpfiles --create to create runtime directories with correct ownership. The tmpfiles.d config is installed by the package manager to /usr/lib/tmpfiles.d/nftban.conf. This call ensures /run/nftban and other tmpfiles-managed paths exist with correct owner/mode immediately after install (not just on next boot).
func CleanStaleFiles ¶
CleanStaleFiles removes all known stale files from prior NFTBan versions. Errors are logged but never fatal.
func CriticalCoreTimers ¶ added in v1.135.0
func CriticalCoreTimers() []string
CriticalCoreTimers returns the critical core timer unit names, for the install_state critical-timer validator (which lives in another package).
func EnableLogin ¶
EnableLogin runs "nftban login enable" to activate login monitoring. Non-fatal — logs warnings.
func EnablePanel ¶
EnablePanel runs "nftban panel <name> enable" for the detected panel. Non-fatal — logs warnings.
func ReconcileTimers ¶
ReconcileTimers enables and starts all core timers. Controlled by NFTBAN_RECONCILE_CORE_TIMERS in nftban.conf (default: true).
func RestartPolkit ¶ added in v1.76.0
RestartPolkit restarts the polkit service so that newly installed or removed polkit rules take effect. Non-fatal — polkit may not be installed.
func ShouldReconcile ¶ added in v1.135.0
ShouldReconcile checks if NFTBAN_RECONCILE_CORE_TIMERS is set to true in nftban.conf or nftban.conf.local. Default: true (reconcile).
func StartDaemon ¶
StartDaemon enables nftband.socket and nftband.service. Retries up to 3 times with 1s delay. Non-fatal — logs warnings.
Types ¶
This section is empty.