Code Update
This commit is contained in:
@ -2,7 +2,7 @@ wx-auto(){
|
||||
wx-login
|
||||
wx-header "Auto"
|
||||
|
||||
wx-ssh-config sync
|
||||
wx-ssh-keys sync
|
||||
wx-ssh-config-sync
|
||||
wx-ssh-keys-sync
|
||||
wx-ssh-sign
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
wx-ssh-config(){
|
||||
wx-header "SSH / Config"
|
||||
wx-restricted
|
||||
|
||||
case $1 in
|
||||
@ -22,16 +21,19 @@ wx-ssh-config(){
|
||||
}
|
||||
|
||||
wx-ssh-config-edit(){
|
||||
wx-header "SSH / Config"
|
||||
wx-restricted
|
||||
nano ~/.ssh/config
|
||||
}
|
||||
|
||||
wx-ssh-config-save(){
|
||||
wx-header "SSH / Config"
|
||||
wx-restricted
|
||||
curl https://$VAULT_DOMAIN/v1/cli/data/$USERNAME/settings/ssh/config -X POST --header "X-Vault-Token: ${config["login",$ORG]}" -d "{ \"data\": { \"data\": \"$(cat ~/.ssh/config | base64 -w 0)\" } }" -s &> /dev/null
|
||||
}
|
||||
|
||||
wx-ssh-config-sync(){
|
||||
wx-header "SSH / Config"
|
||||
wx-restricted
|
||||
VAULT_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://$VAULT_DOMAIN/v1/cli/data/$USERNAME/settings/ssh/config -X GET --header "X-Vault-Token: ${config["login",$ORG]}")
|
||||
if [[ $VAULT_STATUS -eq 200 ]]
|
||||
|
@ -1,5 +1,5 @@
|
||||
wx-ssh-keys(){
|
||||
wx-header "SSH / Keys"
|
||||
wx-restricted
|
||||
|
||||
case $1 in
|
||||
generate)
|
||||
@ -27,6 +27,7 @@ wx-ssh-keys(){
|
||||
}
|
||||
|
||||
wx-ssh-keys-generate(){
|
||||
wx-header "SSH / Keys"
|
||||
wx-restricted
|
||||
if [[ ! -z $1 ]]
|
||||
then
|
||||
@ -38,6 +39,7 @@ wx-ssh-keys-generate(){
|
||||
}
|
||||
|
||||
wx-ssh-keys-retrieve(){
|
||||
wx-header "SSH / Keys"
|
||||
wx-restricted
|
||||
if [[ ! -z $1 ]]
|
||||
then
|
||||
@ -51,6 +53,7 @@ wx-ssh-keys-retrieve(){
|
||||
}
|
||||
|
||||
wx-ssh-keys-save(){
|
||||
wx-header "SSH / Keys"
|
||||
wx-restricted
|
||||
if [[ ! -z $1 ]]
|
||||
then
|
||||
@ -62,6 +65,7 @@ wx-ssh-keys-save(){
|
||||
}
|
||||
|
||||
wx-ssh-keys-sync(){
|
||||
wx-header "SSH / Keys"
|
||||
wx-restricted
|
||||
echo ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user