From 26cafc5012984f9c9ab80c68aa751bf3d63f728a Mon Sep 17 00:00:00 2001 From: Frederic Gurr Date: Thu, 15 Aug 2024 16:16:42 +0200 Subject: [PATCH] Refactor pw_store_path for ssh key creation --- pass/add_creds.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pass/add_creds.sh b/pass/add_creds.sh index 4740daf..c992188 100755 --- a/pass/add_creds.sh +++ b/pass/add_creds.sh @@ -82,6 +82,10 @@ _generate_ssh_keys() { local short_name="${project_name##*.}" local temp_path="/tmp/${short_name}_id_rsa" + local pw_store_path="bots/${project_name}/${site}" + #debug + #echo "pw_store_path: ${pw_store_path}"; + # shellcheck disable=SC1003 pwgen -1 -s -r '\\"-' -y 64 | passw cbi insert -m "${pw_store_path}/id_rsa.passphrase" passw cbi "${pw_store_path}/id_rsa.passphrase" | "${SCRIPT_FOLDER}"/../ssh-keygen-ni.sh -C "${email}" -f "${temp_path}" @@ -251,10 +255,6 @@ ssh_keys() { exit 1 fi - local pw_store_path="bots/${project_name}/${site}" - #debug - #echo "pw_store_path: ${pw_store_path}"; - if [ -z "${username}" ]; then echo "Username not given, using default: genie.${short_name}" user="genie.${short_name}"