Fix Code
This commit is contained in:
parent
9387e15062
commit
352b7b2325
29
init.sh
29
init.sh
@ -17,27 +17,27 @@ wiBold=$(tput bold)
|
||||
wiNormal=$(tput sgr0)
|
||||
|
||||
wi-header(){
|
||||
wx-header $1 $2
|
||||
wx-header "$1" $2
|
||||
}
|
||||
|
||||
wi-repeat(){
|
||||
wx-repeat $1 $2
|
||||
wx-repeat "$1" "$2"
|
||||
}
|
||||
|
||||
wi-login(){
|
||||
wx-login $1 $2
|
||||
wx-login "$1" "$2"
|
||||
}
|
||||
|
||||
wx-start(){
|
||||
wi-start
|
||||
}
|
||||
|
||||
wx-stop(){
|
||||
wi-stop
|
||||
}
|
||||
|
||||
wi-delete(){
|
||||
if [[ -f "init.sh" ]]
|
||||
then
|
||||
rm init.sh
|
||||
fi
|
||||
}
|
||||
wxBold=$wiBold
|
||||
wxNormal=$wiNormal
|
||||
|
||||
wx-header(){
|
||||
if [[ $2 == "h1" ]]
|
||||
@ -109,7 +109,7 @@ wi-init(){
|
||||
|
||||
export HVT=${config["login",$ORG]}
|
||||
|
||||
/opt/ansible/bin/ansible-galaxy collection install ansible.posix ansible.utils community.crypto community.docker community.general community.hashi_vault community.libvirt community.mysql community.postgresql containers.podman --upgrade
|
||||
/opt/ansible/bin/ansible-galaxy collection install ansible.posix ansible.utils community.crypto community.docker community.general community.hashi_vault community.libvirt community.mysql community.postgresql containers.podman --upgrade &> /dev/null
|
||||
|
||||
/opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/init playbooks/init.yml -t init
|
||||
|
||||
@ -117,8 +117,6 @@ wi-init(){
|
||||
}
|
||||
|
||||
wx-login(){
|
||||
ORG=$1
|
||||
|
||||
if [[ -z "$HOSTNAME" || ${#HOSTNAME} -lt 5 ]]
|
||||
then
|
||||
wx-header "Login"
|
||||
@ -299,7 +297,7 @@ wx-repeat() {
|
||||
wi-restricted(){
|
||||
if [[ $USER != "root" && $USER != "local" ]]
|
||||
then
|
||||
sudo $0 $1 $2
|
||||
sudo $1
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@ -313,13 +311,10 @@ wi-stop (){
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
wi-delete
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
wi-start
|
||||
wi-restricted $0 $1 $2
|
||||
wi-restricted "$0 $1 $2"
|
||||
wi-init $1 $2
|
||||
wi-stop
|
||||
|
@ -18,7 +18,6 @@ wiNormal=$(tput sgr0)
|
||||
|
||||
{{ CODES }}
|
||||
|
||||
wi-start
|
||||
wi-restricted $0 $1 $2
|
||||
wi-restricted "$0 $1 $2"
|
||||
wi-init $1 $2
|
||||
wi-stop
|
||||
|
@ -1,15 +1,22 @@
|
||||
wi-header(){
|
||||
wx-header $1 $2
|
||||
wx-header "$1" "$2"
|
||||
}
|
||||
|
||||
wi-repeat(){
|
||||
wx-repeat $1 $2
|
||||
wx-repeat "$1" "$2"
|
||||
}
|
||||
|
||||
wi-login(){
|
||||
wx-login $1 $2
|
||||
wx-login "$1" "$2"
|
||||
}
|
||||
|
||||
wx-start(){
|
||||
wi-start
|
||||
}
|
||||
|
||||
wx-stop(){
|
||||
wi-stop
|
||||
}
|
||||
|
||||
wxBold=$wiBold
|
||||
wxNormal=$wiNormal
|
||||
|
@ -1,6 +0,0 @@
|
||||
wi-delete(){
|
||||
if [[ -f "init.sh" ]]
|
||||
then
|
||||
rm init.sh
|
||||
fi
|
||||
}
|
@ -43,7 +43,7 @@ wi-init(){
|
||||
|
||||
export HVT=${config["login",$ORG]}
|
||||
|
||||
/opt/ansible/bin/ansible-galaxy collection install ansible.posix ansible.utils community.crypto community.docker community.general community.hashi_vault community.libvirt community.mysql community.postgresql containers.podman --upgrade
|
||||
/opt/ansible/bin/ansible-galaxy collection install ansible.posix ansible.utils community.crypto community.docker community.general community.hashi_vault community.libvirt community.mysql community.postgresql containers.podman --upgrade &> /dev/null
|
||||
|
||||
/opt/ansible/bin/ansible-pull -U ssh://git@$GIT_DOMAIN:$GIT_PORT/$GIT_REPOSITORY --vault-password-file ~/.ansible/vault.yml --private-key ~/.ssh/init playbooks/init.yml -t init
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
wx-login(){
|
||||
ORG=$1
|
||||
|
||||
if [[ -z "$HOSTNAME" || ${#HOSTNAME} -lt 5 ]]
|
||||
then
|
||||
wx-header "Login"
|
||||
|
@ -1,7 +1,7 @@
|
||||
wi-restricted(){
|
||||
if [[ $USER != "root" && $USER != "local" ]]
|
||||
then
|
||||
sudo $0 $1 $2
|
||||
sudo $1
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@ -3,7 +3,5 @@ wi-stop (){
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
wi-delete
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user