install

package
v0.34.8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: GPL-3.0 Imports: 26 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SystemdScript = `` /* 776-byte string literal not displayed */
View Source
const SysvScript = `` /* 2263-byte string literal not displayed */

SysvScript Keep it in sync with the template from service_sysv_linux.go file Use "ps | grep -v grep | grep $(get_pid)" because "ps PID" may not work on OpenWrt

Variables

View Source
var BuildTarget string

Functions

func ControlService added in v0.34.8

func ControlService(s service.Service, name, action string) error

ControlService runs a service control action. SysV init systems are driven through the init script directly so BusyBox based systems such as OpenWrt work as well.

func CopyDir

func CopyDir(srcPath string, destPath string) error

CopyDir copies the files under srcPath into destPath, creating directories as needed.

func NPC added in v0.34.8

func NPC() (string, error)

NPC installs the npc executable and returns the path the service should run.

func NPS added in v0.34.8

func NPS() (string, error)

NPS installs the nps executable, web assets and, on a fresh install, the config directory. It returns the path the service should run.

func RemoveStaleExecutables added in v0.34.8

func RemoveStaleExecutables()

RemoveStaleExecutables deletes executables that an earlier update moved aside on Windows. They stay locked until the process running them exits, so failures are ignored and retried on the next start or update.

func RestartAfterUpdate added in v0.34.8

func RestartAfterUpdate(s service.Service, name string, replaced []string) error

RestartAfterUpdate restarts the service so it runs the replaced executables. Only an installed and running service is restarted; otherwise the new version takes effect on the next start. When the service is known to run an executable outside replaced it is left alone, since a restart would not pick up the update. A nil s means the service manager is unavailable.

func UpdateNpc

func UpdateNpc() ([]string, error)

UpdateNpc replaces the npc executables with the latest release. It returns the replaced executables; none with a nil error means the running version is already the latest.

func UpdateNps

func UpdateNps() ([]string, error)

UpdateNps replaces the nps executables with the latest release and then refreshes the web assets of the current run directory. It returns the replaced executables; none with a nil error means the running version is already the latest.

Types

This section is empty.

Jump to

Keyboard shortcuts

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