Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
fix(files): added logfile out for /dev/tty error
Browse files Browse the repository at this point in the history
  • Loading branch information
stebenz committed Mar 5, 2020
1 parent cf471a5 commit bbe06e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/initialize_gopass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ chmod 600 $HOME/.ssh/*

function import_and_trust_gpg-key {
# import gpg keys to keystore
for gpgfile in $(ls ${GPGFOLDER}); do gpg --import ${GPGFOLDER}/${gpgfile} ; done
for gpgfile in $(ls ${GPGFOLDER}); do gpg --import ${GPGFOLDER}/${gpgfile} &>> $LOGFILE ; done
# trust imported keys
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); do echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key $fpr trust ; done
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u &>> $LOGFILE); do echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key $fpr trust &>> $LOGFILE ; done
}

function initialize_gopass_store {
#init gopass witht the technical gpg user
# e.g.: gopass --yes init --crypto gpg-id <YOURID> --rcs gitcli
gopass --yes init --crypto gpg-id $(gpg --list-keys --with-colons | awk -F: '/pub:/ {print $5}') --rcs gitcli
gopass --yes init --crypto gpg-id $(gpg --list-keys --with-colons | awk -F: '/pub:/ {print $5}') --rcs gitcli &>> $LOGFILE
}

function unmarshall_json_and_clone_remote {
Expand All @@ -48,7 +48,7 @@ done

function clone_remote_gopass_store {
# checkout the customers passtore
gopass --yes clone $SECRET_REPOSITORY $SECRET_STORE --sync gitcli
gopass --yes clone $SECRET_REPOSITORY $SECRET_STORE --sync gitcli &>> $LOGFILE
}

initialize_ssh
Expand Down

0 comments on commit bbe06e9

Please sign in to comment.