Skip to main content

Module autostart

Module autostart 

Source
Expand description

Start the daemon when you log in, so nobody has to remember to.

A reader who must run ssh-browser serve before their bookmarks resolve does not have a product, they have a program they run. The daemon is not a thing anyone wants to think about — it is what makes a URL work — so it should already be there.

Unlike crate::tls, which prints a command and executes nothing, this does the thing. The difference is about consent rather than effort: trusting a certificate authority changes what the whole machine believes, so it is a decision to make with your own hands. Starting a program of your own at login is what was asked for, and printing a command to copy would be the same failure in a politer form.

The three platforms are a parameter rather than a cfg!, for the reason written out in tls::Store: a platform-specific string only its own platform can run is a string nobody tests. Here the plan is worked out as data, checked on any machine, and only apply touches anything.

Structs§

Plan
Everything a platform needs done, worked out without doing any of it.

Enums§

Kind
How a platform starts something at login.

Functions§

apply
Do it, saying what was done as it happens.
home
The home directory, which two of the three platforms put their login entry under.
install_plan
What installing looks like on kind, for a daemon at exe.
remove_plan
What removing looks like.