mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
B #-: Cleanup ssh-agent socket before starting (#2413)
When (for whatever reason) opennebula-ssh-agent gets killed it leaves existing socket and following start fails with opennebula-ssh-agent[2333]: unix_listener: cannot bind to path /var/run/one/ssh-agent.sock: Address already in use
This commit is contained in:
parent
68f0449f1f
commit
fdebcaf2a2
@ -8,7 +8,7 @@ Group=oneadmin
|
||||
User=oneadmin
|
||||
Environment=SSH_AUTH_SOCK=/var/run/one/ssh-agent.sock
|
||||
# ssh-agent is executed via shell wrapper to workaround a SELinux issue
|
||||
ExecStartPre=/bin/sh -c "echo SSH_AUTH_SOCK=$SSH_AUTH_SOCK > /var/run/one/ssh-agent.env"
|
||||
ExecStartPre=/bin/sh -c "echo SSH_AUTH_SOCK=$SSH_AUTH_SOCK > /var/run/one/ssh-agent.env; rm -f $SSH_AUTH_SOCK"
|
||||
ExecStart=/bin/sh -c "exec /usr/bin/ssh-agent -a $SSH_AUTH_SOCK"
|
||||
ExecStartPost=-/bin/sh -c "/usr/bin/ssh-add"
|
||||
ExecStopPost=/usr/bin/rm -f /var/run/one/ssh-agent.env
|
||||
|
Loading…
Reference in New Issue
Block a user