install

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package install sets an application up as a systemd service on a Linux host: a system user, its directories, the binary under /opt, an environment file filled in by asking for each variable the application reads, and a hardened unit. Running it again keeps every value already in place and asks only for variables the current binary declares that the file lacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Installer

type Installer struct {
	Name         string               // binary, user, service, and directory name
	Declarations []config.Declaration // every variable the application reads
	Input        io.Reader            // answers; defaults to stdin
	Output       io.Writer            // prompts and the summary; defaults to stdout
}

Installer installs the running executable as the service Name.

func (Installer) Run

func (installer Installer) Run(ctx context.Context, executable string) error

Run installs executable, the path of the running binary, and starts the service. It must run as root on a Linux host with systemd.

Jump to

Keyboard shortcuts

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