Skip to content

Commit

Permalink
Refactor pw_store_path for ssh key creation
Browse files Browse the repository at this point in the history
  • Loading branch information
fredg02 committed Aug 15, 2024
1 parent ccaec78 commit 26cafc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pass/add_creds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 26cafc5

Please sign in to comment.