3 ms·
You can order them using user targets. Ie, create a ssh-agent.target and have the default target depend on it. Now your ssh-agent is guaranteed to be online w
by zaarn 4y ago
You can order them using user targets.
Ie, create a ssh-agent.target and have the default target depend on it.
Now your ssh-agent is guaranteed to be online when the default target comes up.
- georgyo 4y agoHis method already does that. Creating a target for a single service is very much overkill. Though creating a target like setup or pre-default and putting in there might be a fine idea if you have other services you want to run that way. But, since the unit is already setting a fixed path for the agent, I would just put that path in my .profile and call it a day. Having systems do environment variable injection seems too fragile to me, especially for static variables.
- WhyNotHugo 4y agoI mostly do the injection to keep EVERYTHING related to the agent in a single file. But yeah, `environment.d` or `.profile` would be simpler. I mostly opted to keep everything in one place.