Skip to main content

Module service

Module service 

Source
Expand description

Installing isb serve as a systemd user service.

The unit runs the isb binary that installed it, by its canonical path. A version manager that keeps each version in its own directory (mise does) therefore pins that version: after an upgrade, install again to point the unit at the new binary. Settings live in an environment file that is created once and then left to the user.

Structs§

ServiceInstall
ServiceOptions

Constants§

CREDENTIAL_FILE
The credential file isb serve install writes, under the config dir.
DEFAULT_LISTEN
LISTEN_ENV
UNIT_NAME

Functions§

credential_path
The credential’s path as the unit names it: %h/... under the home directory, else absolute; escaped for a unit file either way.
install_user_service
Write the unit and env file, (re)start the service, and wait until it is healthy. Safe to run again: it updates an existing installation.
render_env
The env file written on first install.
render_unit
The unit file. No sandboxing directives: the service drives incusd and reads the user’s projects, and most of them need a system manager anyway. credential (from credential_path) loads the encrypted secrets key.