services

package
v1.91.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTmpfiles added in v1.76.0

func ApplyTmpfiles(exec executor.Executor, log *logging.Logger)

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

func CleanStaleFiles(exec executor.Executor, log *logging.Logger)

CleanStaleFiles removes all known stale files from prior NFTBan versions. Errors are logged but never fatal.

func EnableLogin

func EnableLogin(exec executor.Executor, log *logging.Logger)

EnableLogin runs "nftban login enable" to activate login monitoring. Non-fatal — logs warnings.

func EnablePanel

func EnablePanel(exec executor.Executor, panel detect.PanelType, log *logging.Logger)

EnablePanel runs "nftban panel <name> enable" for the detected panel. Non-fatal — logs warnings.

func ReconcileTimers

func ReconcileTimers(exec executor.Executor, log *logging.Logger)

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

func RestartPolkit(exec executor.Executor, log *logging.Logger)

RestartPolkit restarts the polkit service so that newly installed or removed polkit rules take effect. Non-fatal — polkit may not be installed.

func StartDaemon

func StartDaemon(exec executor.Executor, log *logging.Logger)

StartDaemon enables nftband.socket and nftband.service. Retries up to 3 times with 1s delay. Non-fatal — logs warnings.

func SyncWhitelist

func SyncWhitelist(exec executor.Executor, log *logging.Logger)

SyncWhitelist runs "nftban sync" to load whitelists and feeds. Retries up to 3 times with 1s delay. Non-fatal — logs warnings.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL