From 5638d25af55736ded479373401bce51885e29123 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 17 May 2023 11:59:06 +0200 Subject: fixed HOST variable not used --- bin/guiscripts/keyadd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/keyadd b/bin/guiscripts/keyadd index 7412199..b5bc4d9 100755 --- a/bin/guiscripts/keyadd +++ b/bin/guiscripts/keyadd @@ -33,6 +33,7 @@ die "key: $key" test ! -f "$SSHFOLDER/$key" && exit 1 HOST=$(hostnamectl hostname | sed 's/forlure/fl/;s/montecristo/mc/') +die "HOST: $HOST" if [ "$1" = "-d" ] then @@ -41,7 +42,7 @@ then notify-send "$0" "could not delete." elif ! ssh-add -l | grep -q "$(ssh-keygen -lf "$SSHFOLDER"/$key)" then - export PASSWORD="keys/fl/ssh/$key" + export PASSWORD="keys/$HOST/ssh/$key" export SSH_ASKPASS="$0" ssh-add - < "$SSHFOLDER"/$key && notify-send "$0" "added $key" -- cgit v1.2.3