.files/dotfiles/config/systemd/user/ssh-agent.service
Philip Henning c377eb276a consolidate and templeate my to files
in order to stop maintainung different files for each operationg system
2021-09-11 23:45:56 +02:00

21 lines
440 B
Desktop File

#
# {{@@ header() @@}}
#
[Unit]
Description=SSH key agent
Wants=environment.target
Before=environment.target
IgnoreOnIsolate=true
[Service]
Type=forking
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK
ExecStartPost=/usr/bin/systemctl --user set-environment SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
#ExecStop=/usr/bin/ssh-agent -k
ExecStopPost=/bin/rm ${SSH_AUTH_SOCK}
[Install]
WantedBy=default.target