Code Update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
wx-ssh-config(){
|
||||
echo " >> SSH / Config << "
|
||||
echo "------------------------------"
|
||||
wx-header "SSH / Config"
|
||||
wx-restricted
|
||||
|
||||
case $1 in
|
||||
edit)
|
||||
@@ -22,14 +22,17 @@ wx-ssh-config(){
|
||||
}
|
||||
|
||||
wx-ssh-config-edit(){
|
||||
wx-restricted
|
||||
nano ~/.ssh/config
|
||||
}
|
||||
|
||||
wx-ssh-config-save(){
|
||||
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-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 ]]
|
||||
then
|
||||
|
||||
@@ -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 ""
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
wx-ssh-sign(){
|
||||
echo " >> SSH / Sign << "
|
||||
echo "------------------------------"
|
||||
wx-header "SSH / Sign"
|
||||
wx-restricted
|
||||
|
||||
if [[ $ORG == "warengroup" ]]
|
||||
then
|
||||
@@ -17,6 +17,8 @@ wx-ssh-sign(){
|
||||
}
|
||||
|
||||
wx-ssh-sign-create(){
|
||||
wx-restricted
|
||||
|
||||
NAME=$1
|
||||
ROLE=$2
|
||||
PRINCIPALS=$2
|
||||
|
||||
Reference in New Issue
Block a user