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

View File

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

View File

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

View File

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

View File

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

16
wx
View File

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