diff options
Diffstat (limited to '.bash')
-rw-r--r-- | .bash/vars.bash | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/.bash/vars.bash b/.bash/vars.bash index cb124be..088e1e9 100644 --- a/.bash/vars.bash +++ b/.bash/vars.bash @@ -9,8 +9,6 @@ export SCRSHDIR="${HOME}/Pictures" export SSHHOME="${HOME}/.ssh" # 1. key files, array: SSHKEYS=( "${SSHHOME}/id_ed25519" "${SSHHOME}/id_rsa" ) -# 2. SSH environment file -export SSHENVFILE="${HOME}/.ssh/sshenv" # 3. Hosts on which ssh-agent should run, FQDN. Array. # Typically, "hosts" will equal your workstations. See ssh_config(5) (esp. ForwardAgent) # Interpreted by fgrep / grep -F. @@ -81,3 +79,13 @@ export LIBVIRT_DEFAULT_URI="qemu:///system" if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi + +if [ -r "vars.bash.local" ];then + source vars.bash.local +fi +# SSH environment file +#!/usr/bin/env bash +# vim:syntax=sh +if echo "${SSHAGH[@]}" | fgrep --word-regexp "$(hostname -f)" > /dev/null;then + export SSHENVFILE="${HOME}/.ssh/sshenv" +fi |