Improve password-store installation script with RSA and GPG key checks
This commit is contained in:
10
install.sh
10
install.sh
@@ -141,10 +141,15 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clone password-store
|
# Clone password-store
|
||||||
if [ "$(whoami)" = "trude" ]; then
|
if [ "$USER" = "trude" ]; then
|
||||||
|
if [ ! -f "$HOME/.ssh/id_rsa" ] || [ ! -f "$HOME/.ssh/id_rsa.pub" ]; then
|
||||||
|
printf "${RED}RSA key not found. Please add your RSA key pair for password-store.${NC}\n"
|
||||||
|
elif ! gpg --list-keys "ehtrude@gmail.com" >/dev/null 2>&1; then
|
||||||
|
printf "${RED}GPG key for ehtrude@gmail.com not found. Please import the key for password-store.${NC}\n"
|
||||||
|
else
|
||||||
if [ ! -d "$HOME/.password-store" ]; then
|
if [ ! -d "$HOME/.password-store" ]; then
|
||||||
printf "${YELLOW}Cloning password-store...${NC}\n"
|
printf "${YELLOW}Cloning password-store...${NC}\n"
|
||||||
git clone https://github.com/TrudeEH/password-store "$HOME/.password-store"
|
git clone git@github.com:TrudeEH/password-store.git "$HOME/.password-store"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printf "${RED}Error cloning password-store.${NC}\n"
|
printf "${RED}Error cloning password-store.${NC}\n"
|
||||||
else
|
else
|
||||||
@@ -154,6 +159,7 @@ if [ "$(whoami)" = "trude" ]; then
|
|||||||
printf "${CYAN}Password-store already present.${NC}\n"
|
printf "${CYAN}Password-store already present.${NC}\n"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Security Scan
|
# Security Scan
|
||||||
if [ ! -f "$HOME/dotfiles/logs/lynis_scan.log" ]; then
|
if [ ! -f "$HOME/dotfiles/logs/lynis_scan.log" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user