Updated, added ssh-agent runit service
This commit is contained in:
parent
e6c6ed2ddd
commit
684d1f3b66
2 changed files with 20 additions and 0 deletions
0
config/runit/service/.gitkeep
Normal file
0
config/runit/service/.gitkeep
Normal file
20
config/runit/sv/ssh-agent
Executable file
20
config/runit/sv/ssh-agent
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Start ssh-agent from runit
|
||||
#
|
||||
# Author: Dave Eddy <dave@daveeddy.com>
|
||||
# Date: August 29, 2018
|
||||
# License: MIT
|
||||
|
||||
file=~/.ssh/ssh-agent-env
|
||||
|
||||
exec > "$file"
|
||||
|
||||
echo "# started $(date)"
|
||||
|
||||
# For some reason, this line doesn't get emitted by ssh-agent when it is run
|
||||
# with -d or -D. Since we are starting the program with exec we already know
|
||||
# the pid ahead of time though so we can create this line manually
|
||||
echo "SSH_AGENT_PID=$$; export SSH_AGENT_PID"
|
||||
|
||||
exec ssh-agent -D
|
Loading…
Reference in a new issue