commit by to_remotes 2023-10-05 09:27:39 +0200 from vmdevac
parent
7d91d1c7ea
commit
8925fc1852
10
init.sh
10
init.sh
|
|
@ -38,11 +38,6 @@ function clone_repo_with_retry(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function start_ssh_agent(){
|
|
||||||
SHORT_HOST="${HOSTNAME/.*/}"
|
|
||||||
ssh_env_cache="$HOME/.ssh/environment-$SHORT_HOST"
|
|
||||||
|
|
||||||
# Oh-my-zsh compatible bash ssh-agent start script
|
# Oh-my-zsh compatible bash ssh-agent start script
|
||||||
function _start_agent() {
|
function _start_agent() {
|
||||||
if [[ -f "$ssh_env_cache" ]]; then
|
if [[ -f "$ssh_env_cache" ]]; then
|
||||||
|
|
@ -58,6 +53,11 @@ function start_ssh_agent(){
|
||||||
chmod 600 "$ssh_env_cache"
|
chmod 600 "$ssh_env_cache"
|
||||||
. "$ssh_env_cache" > /dev/null
|
. "$ssh_env_cache" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function start_ssh_agent(){
|
||||||
|
SHORT_HOST="${HOSTNAME/.*/}"
|
||||||
|
ssh_env_cache="$HOME/.ssh/environment-$SHORT_HOST"
|
||||||
|
|
||||||
_start_agent
|
_start_agent
|
||||||
|
|
||||||
unset ssh_env_cache
|
unset ssh_env_cache
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue