proper ssh-agent killing
This commit is contained in:
		
							parent
							
								
									acb8107178
								
							
						
					
					
						commit
						dbcca138bc
					
				@ -7,12 +7,12 @@ if [ -z $SSH_AGENT_SOCK ] ; then
 | 
				
			|||||||
        if [ -e ~/.ssh/id_ed25519 ] ; then
 | 
					        if [ -e ~/.ssh/id_ed25519 ] ; then
 | 
				
			||||||
            ssh-add ~/.ssh/id_ed25519
 | 
					            ssh-add ~/.ssh/id_ed25519
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            kill $SSH_AGENT_PID
 | 
					 | 
				
			||||||
            echo -e "No ed25519 keys found! Killing $SSH_AGENT_PID!"
 | 
					            echo -e "No ed25519 keys found! Killing $SSH_AGENT_PID!"
 | 
				
			||||||
 | 
					            eval $(ssh-agent -k)
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        kill $SSH_AGENT_PID
 | 
					 | 
				
			||||||
        echo "Killing $SSH_AGENT_PID!"
 | 
					        echo "Killing $SSH_AGENT_PID!"
 | 
				
			||||||
 | 
					        eval $(ssh-agent -k)
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user