Documentation
¶
Index ¶
Constants ¶
const AgentInterval = "60s"
AgentInterval is how often the agent probes.
A minute, because the history it writes is charted per minute and a slower timer would draw gaps into every chart. The report being up to a minute stale is what design/appify.md §3 already accepted as the price of the reporting account having no privileges.
const StagedAgent = "/tmp/.komizo-box.staged"
StagedAgent is where the agent binary is written before agent-install.sh moves it into place.
Under /tmp rather than beside its destination, so a transfer that dies half way leaves a stray file somewhere harmless rather than a truncated komizo-box in /usr/local/bin that the next boot would try to run.
Variables ¶
var AlpineInitScript string
var AlpineProxyScript string
var AlpineRemoveScript string
var AlpineScript string
Functions ¶
func AgentInstall ¶ added in v0.0.13
AgentInstall installs komizo-box and starts it under OpenRC.
The BINARY is not in here. It is several megabytes of ELF, staged over its own connection at StagedAgent, and this moves it into place -- see agent-install.sh.
version is the komizo release doing the installing and stamp is the content hash of the agents it carries. Both are recorded so the interface can answer two different questions: which komizo set this box up, and would running the update change anything.
func ShQuote ¶ added in v0.0.12
ShQuote wraps a value for a shell command line.
Single quotes, with any single quote in the value closed, escaped and reopened -- the one form that is safe for arbitrary text in POSIX sh.
Exported and living HERE because this is the package that builds shell. The app package had its own copy; it now calls this one, so there is a single definition of the rule that makes every quoted value in this tool safe.
Types ¶
This section is empty.