Update Login and Logout process

This commit is contained in:
Christer Warén
2026-01-18 18:54:36 +02:00
parent a9539ffb9d
commit a37fce53e8
6 changed files with 19 additions and 10 deletions

View File

@@ -61,6 +61,7 @@ wx-login(){
if [[ -z $VAULT_LOGIN || ${#VAULT_LOGIN} -lt 95 || ${#VAULT_LOGIN} -gt 95 ]]
then
wxi-content status "Login" "Failed"
wxi-footer
wxi-stop
fi
@@ -105,7 +106,10 @@ wx-login(){
if [[ -z $VAULT_LOGIN || ${#VAULT_LOGIN} -lt 95 || ${#VAULT_LOGIN} -gt 95 ]]
then
wxi-content status "Login" "Failed"
wxi-stop
wxi-footer
wx-logout &> /dev/null
wx-login
#wxi-stop
fi
TOKEN=$VAULT_LOGIN

View File

@@ -17,7 +17,6 @@ wx-logout(){
TOKEN=""
wxi-config login
wxi-footer
wxi-stop
fi
}

View File

@@ -1,5 +1,5 @@
wx-infra(){
wx-login &> /dev/null
wx-login
wx-auto &> /dev/null
wxi-header "Infra"

View File

@@ -1,5 +1,5 @@
wx-auto(){
wx-login &> /dev/null
wx-login
wxi-header "Auto"
wxi-restricted

View File

@@ -1,5 +1,5 @@
wx-settings(){
wx-login &> /dev/null
wx-login
wx-auto &> /dev/null
wxi-header "Settings"

16
wx
View File

@@ -271,7 +271,7 @@ wxi-footer
}
wx-infra(){
wx-login &> /dev/null
wx-login
wx-auto &> /dev/null
wxi-header "Infra"
@@ -455,6 +455,7 @@ wx-login(){
if [[ -z $VAULT_LOGIN || ${#VAULT_LOGIN} -lt 95 || ${#VAULT_LOGIN} -gt 95 ]]
then
wxi-content status "Login" "Failed"
wxi-footer
wxi-stop
fi
@@ -499,7 +500,10 @@ wx-login(){
if [[ -z $VAULT_LOGIN || ${#VAULT_LOGIN} -lt 95 || ${#VAULT_LOGIN} -gt 95 ]]
then
wxi-content status "Login" "Failed"
wxi-stop
wxi-footer
wx-logout &> /dev/null
wx-login
#wxi-stop
fi
TOKEN=$VAULT_LOGIN
@@ -552,7 +556,6 @@ wx-logout(){
TOKEN=""
wxi-config login
wxi-footer
wxi-stop
fi
}
@@ -621,7 +624,7 @@ wx-update(){
}
wx-auto(){
wx-login &> /dev/null
wx-login
wxi-header "Auto"
wxi-restricted
@@ -642,7 +645,7 @@ wx-clean(){
}
wx-settings(){
wx-login &> /dev/null
wx-login
wx-auto &> /dev/null
wxi-header "Settings"
@@ -839,7 +842,10 @@ wxi-ssh-keys-sign(){
if [[ $USERNAME == "cwchristerw" ]]
then
wxi-ssh-keys-sign-create cwchristerw sysadmin 3600
wxi-ssh-keys-sign-create warengroup sysadmin 3600
else
wxi-ssh-keys-sign-create $ORG sysadmin 3600
fi
wxi-footer
}