Code Update

This commit is contained in:
Christer Warén
2024-06-01 00:28:18 +03:00
parent 0ef3f8d8d6
commit e36265403e
18 changed files with 197 additions and 132 deletions

View File

@@ -1,6 +1,5 @@
wx-ssh-keys(){
echo " >> SSH / Keys << "
echo "------------------------------"
wx-header "SSH / Keys"
case $1 in
generate)
@@ -28,6 +27,7 @@ wx-ssh-keys(){
}
wx-ssh-keys-generate(){
wx-restricted
if [[ ! -z $1 ]]
then
if [[ ! -f "$HOME/.ssh/keys/$1" ]]
@@ -38,6 +38,7 @@ wx-ssh-keys-generate(){
}
wx-ssh-keys-retrieve(){
wx-restricted
if [[ ! -z $1 ]]
then
VAULT_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://$VAULT_DOMAIN/v1/cli/data/$USERNAME/settings/ssh/keys/$1 -X GET --header "X-Vault-Token: ${config["login",$ORG]}")
@@ -50,6 +51,7 @@ wx-ssh-keys-retrieve(){
}
wx-ssh-keys-save(){
wx-restricted
if [[ ! -z $1 ]]
then
if [[ -f "$HOME/.ssh/keys/$1" ]]
@@ -60,5 +62,6 @@ wx-ssh-keys-save(){
}
wx-ssh-keys-sync(){
wx-restricted
echo ""
}