class

Obsctl::Service::ServiceInstaller

Inherits Reference < Object

Installs and controls the obsctl systemd user service.

Constants

VALID_ACTIONS = ["install", "uninstall", "status", "start", "stop", "restart"] of ::String

Constructors

new(service_path : String = SystemdUserService.default_path, executable_path : String = default_executable_path, runner : SystemCommandRunner = SystemCommandRunner.new)

Creates a service installer with injectable paths and command runner for tests.

Source

Instance methods

install

Writes the service unit and reloads the user systemd manager.

Source
run(action : String) : String

Runs a service action such as install, start, status, or uninstall.

Source
uninstall

Removes the service unit when present and reloads the user systemd manager.

Source