Arif Ali
d84ce463b1
* Add functions.sh for common tasks * Update various scripts to use functions.sh * Update mongo status to disable all ssh key checks * Add a few extra scripts
18 lines
353 B
Bash
Executable File
18 lines
353 B
Bash
Executable File
#!/bin/bash
|
|
|
|
check_controller()
|
|
{
|
|
controller=$1
|
|
model="cpe-jammy"
|
|
|
|
juju status -m "${controller}":${model} --color | grep "Unit " -A 999999 | grep -E -v "started.*ubuntu@|active.*idle"
|
|
|
|
}
|
|
|
|
if [[ -z "$1" ]] ; then
|
|
check_controller "$(juju controllers --format json | jq -r .\"current-controller\")"
|
|
else
|
|
check_controller "${1}"
|
|
fi
|
|
|