FIx typos
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
wx-auto(){
|
wx-auto(){
|
||||||
|
wx-login &> /dev/null
|
||||||
|
|
||||||
wxi-header "Auto"
|
wxi-header "Auto"
|
||||||
wxi-restricted
|
wxi-restricted
|
||||||
wxi-footer
|
wxi-footer
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
wx-settings(){
|
wx-settings(){
|
||||||
|
wx-login &> /dev/null
|
||||||
|
wx-auto &> /dev/null
|
||||||
|
|
||||||
wxi-header "Settings"
|
wxi-header "Settings"
|
||||||
wxi-restricted --user
|
wxi-restricted --user
|
||||||
wxi-footer
|
wxi-footer
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
wxi-ssh-keys(){
|
wxi-ssh-keys(){
|
||||||
case ${args['3']} in
|
case ${args['3']} in
|
||||||
generate)
|
generate)
|
||||||
wxi-ssh-keys-retrieve
|
wxi-ssh-keys-retrieve ${args['4']}
|
||||||
wxi-ssh-keys-generate
|
wxi-ssh-keys-generate ${args['4']}
|
||||||
wxi-ssh-keys-save
|
wxi-ssh-keys-save ${args['4']}
|
||||||
;;
|
;;
|
||||||
sign)
|
sign)
|
||||||
wxi-ssh-keys-sign
|
wxi-ssh-keys-sign
|
||||||
;;
|
;;
|
||||||
retrieve)
|
retrieve)
|
||||||
wxi-ssh-keys-retrieve
|
wxi-ssh-keys-retrieve ${args['4']}
|
||||||
;;
|
;;
|
||||||
save)
|
save)
|
||||||
wxi-ssh-keys-save
|
wxi-ssh-keys-save ${args['4']}
|
||||||
;;
|
;;
|
||||||
sync)
|
sync)
|
||||||
wxi-ssh-keys-sync
|
wxi-ssh-keys-sync
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ wxi-ssh-keys-clean(){
|
|||||||
rm "$HOME/.ssh/keys/$1.sig" &> /dev/null
|
rm "$HOME/.ssh/keys/$1.sig" &> /dev/null
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
wx-ssh-keys-clean $ORG
|
wxi-ssh-keys-clean $ORG
|
||||||
|
|
||||||
if [[ $USERNAME == "cwchristerw" ]]
|
if [[ $USERNAME == "cwchristerw" ]]
|
||||||
then
|
then
|
||||||
wx-ssh-keys-clean warengroup
|
wxi-ssh-keys-clean warengroup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in ~/.ssh/keys/*
|
for file in ~/.ssh/keys/*
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ wxi-ssh-keys-sign(){
|
|||||||
wxi-header "SSH / Keys / Sign"
|
wxi-header "SSH / Keys / Sign"
|
||||||
wxi-restricted
|
wxi-restricted
|
||||||
|
|
||||||
wx-ssh-keys-sign-create $ORG sysadmin 3600
|
wxi-ssh-keys-sign-create $ORG sysadmin 3600
|
||||||
|
|
||||||
if [[ $USERNAME == "cwchristerw" ]]
|
if [[ $USERNAME == "cwchristerw" ]]
|
||||||
then
|
then
|
||||||
wx-ssh-keys-sign-create warengroup sysadmin 3600
|
wxi-ssh-keys-sign-create warengroup sysadmin 3600
|
||||||
fi
|
fi
|
||||||
wxi-footer
|
wxi-footer
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ wxi-ssh-keys-sync(){
|
|||||||
then
|
then
|
||||||
for name in $(curl https://$VAULT_DOMAIN/v1/cli/metadata/$USERNAME/settings/ssh/keys -X LIST --header "X-Vault-Token: $VAULT_TOKEN" -s | jq -r '.data.keys | @sh' | tr -d \')
|
for name in $(curl https://$VAULT_DOMAIN/v1/cli/metadata/$USERNAME/settings/ssh/keys -X LIST --header "X-Vault-Token: $VAULT_TOKEN" -s | jq -r '.data.keys | @sh' | tr -d \')
|
||||||
do
|
do
|
||||||
echo $name
|
wxi-content text $name
|
||||||
wx-ssh-keys-retrieve $name --multiple
|
wxi-ssh-keys-retrieve $name --multiple
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
wxi-footer
|
wxi-footer
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ wxi-restricted(){
|
|||||||
wxi-stop
|
wxi-stop
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [[ $(hostname -d) = *"devices.waren.io" ]]
|
elif [[ $(hostname -d) == "devices.waren.io" ]]
|
||||||
then
|
then
|
||||||
ORG=warengroup
|
ORG=warengroup
|
||||||
elif [[ $(hostname -d) = *"devices.christerwaren.fi" ]]
|
elif [[ $(hostname -d) == "devices.christerwaren.fi" ]]
|
||||||
then
|
then
|
||||||
ORG=cwchristerw
|
ORG=cwchristerw
|
||||||
fi
|
fi
|
||||||
|
|||||||
31
wx
31
wx
@@ -52,10 +52,10 @@ wxi-restricted(){
|
|||||||
wxi-stop
|
wxi-stop
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif [[ $(hostname -d) = *"devices.waren.io" ]]
|
elif [[ $(hostname -d) == "devices.waren.io" ]]
|
||||||
then
|
then
|
||||||
ORG=warengroup
|
ORG=warengroup
|
||||||
elif [[ $(hostname -d) = *"devices.christerwaren.fi" ]]
|
elif [[ $(hostname -d) == "devices.christerwaren.fi" ]]
|
||||||
then
|
then
|
||||||
ORG=cwchristerw
|
ORG=cwchristerw
|
||||||
fi
|
fi
|
||||||
@@ -609,6 +609,8 @@ wx-update(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
wx-auto(){
|
wx-auto(){
|
||||||
|
wx-login &> /dev/null
|
||||||
|
|
||||||
wxi-header "Auto"
|
wxi-header "Auto"
|
||||||
wxi-restricted
|
wxi-restricted
|
||||||
wxi-footer
|
wxi-footer
|
||||||
@@ -628,6 +630,9 @@ wx-clean(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
wx-settings(){
|
wx-settings(){
|
||||||
|
wx-login &> /dev/null
|
||||||
|
wx-auto &> /dev/null
|
||||||
|
|
||||||
wxi-header "Settings"
|
wxi-header "Settings"
|
||||||
wxi-restricted --user
|
wxi-restricted --user
|
||||||
wxi-footer
|
wxi-footer
|
||||||
@@ -658,18 +663,18 @@ wxi-ssh-config(){
|
|||||||
wxi-ssh-keys(){
|
wxi-ssh-keys(){
|
||||||
case ${args['3']} in
|
case ${args['3']} in
|
||||||
generate)
|
generate)
|
||||||
wxi-ssh-keys-retrieve
|
wxi-ssh-keys-retrieve ${args['4']}
|
||||||
wxi-ssh-keys-generate
|
wxi-ssh-keys-generate ${args['4']}
|
||||||
wxi-ssh-keys-save
|
wxi-ssh-keys-save ${args['4']}
|
||||||
;;
|
;;
|
||||||
sign)
|
sign)
|
||||||
wxi-ssh-keys-sign
|
wxi-ssh-keys-sign
|
||||||
;;
|
;;
|
||||||
retrieve)
|
retrieve)
|
||||||
wxi-ssh-keys-retrieve
|
wxi-ssh-keys-retrieve ${args['4']}
|
||||||
;;
|
;;
|
||||||
save)
|
save)
|
||||||
wxi-ssh-keys-save
|
wxi-ssh-keys-save ${args['4']}
|
||||||
;;
|
;;
|
||||||
sync)
|
sync)
|
||||||
wxi-ssh-keys-sync
|
wxi-ssh-keys-sync
|
||||||
@@ -747,11 +752,11 @@ wxi-ssh-keys-clean(){
|
|||||||
rm "$HOME/.ssh/keys/$1.sig" &> /dev/null
|
rm "$HOME/.ssh/keys/$1.sig" &> /dev/null
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
wx-ssh-keys-clean $ORG
|
wxi-ssh-keys-clean $ORG
|
||||||
|
|
||||||
if [[ $USERNAME == "cwchristerw" ]]
|
if [[ $USERNAME == "cwchristerw" ]]
|
||||||
then
|
then
|
||||||
wx-ssh-keys-clean warengroup
|
wxi-ssh-keys-clean warengroup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in ~/.ssh/keys/*
|
for file in ~/.ssh/keys/*
|
||||||
@@ -818,11 +823,11 @@ wxi-ssh-keys-sign(){
|
|||||||
wxi-header "SSH / Keys / Sign"
|
wxi-header "SSH / Keys / Sign"
|
||||||
wxi-restricted
|
wxi-restricted
|
||||||
|
|
||||||
wx-ssh-keys-sign-create $ORG sysadmin 3600
|
wxi-ssh-keys-sign-create $ORG sysadmin 3600
|
||||||
|
|
||||||
if [[ $USERNAME == "cwchristerw" ]]
|
if [[ $USERNAME == "cwchristerw" ]]
|
||||||
then
|
then
|
||||||
wx-ssh-keys-sign-create warengroup sysadmin 3600
|
wxi-ssh-keys-sign-create warengroup sysadmin 3600
|
||||||
fi
|
fi
|
||||||
wxi-footer
|
wxi-footer
|
||||||
}
|
}
|
||||||
@@ -850,8 +855,8 @@ wxi-ssh-keys-sync(){
|
|||||||
then
|
then
|
||||||
for name in $(curl https://$VAULT_DOMAIN/v1/cli/metadata/$USERNAME/settings/ssh/keys -X LIST --header "X-Vault-Token: $VAULT_TOKEN" -s | jq -r '.data.keys | @sh' | tr -d \')
|
for name in $(curl https://$VAULT_DOMAIN/v1/cli/metadata/$USERNAME/settings/ssh/keys -X LIST --header "X-Vault-Token: $VAULT_TOKEN" -s | jq -r '.data.keys | @sh' | tr -d \')
|
||||||
do
|
do
|
||||||
echo $name
|
wxi-content text $name
|
||||||
wx-ssh-keys-retrieve $name --multiple
|
wxi-ssh-keys-retrieve $name --multiple
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
wxi-footer
|
wxi-footer
|
||||||
|
|||||||
Reference in New Issue
Block a user