[ADD][SSH] ssh-agent service using systemd
I needed to enable the service after linking the package. This might be better served by yet another step during my Makefile-based installation? I do not do it enough to warrant adding yet more steps for this functionality.
This commit is contained in:
parent
d6330c1767
commit
59893b6a00
5
Makefile
5
Makefile
|
@ -157,6 +157,11 @@ stow-scripts: scripts
|
|||
mkdir -p $(STOW_TARGET)
|
||||
$(STOW) $<
|
||||
|
||||
stow-ssh: ssh
|
||||
$(STOW) $<
|
||||
# Enable & start ssh-agent service
|
||||
systemctl enable --now --user ssh-agent.service
|
||||
|
||||
stow-system-X: STOW_TARGET=/
|
||||
stow-system-X: system-X
|
||||
sudo $(STOW) $<
|
||||
|
|
10
ssh/.config/systemd/user/ssh-agent.service
Normal file
10
ssh/.config/systemd/user/ssh-agent.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=SSH key agent
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
Loading…
Reference in a new issue