useful_scripts/check_juju.sh
Arif Ali d84ce463b1
Updates from local machine
* 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
2024-09-30 10:19:55 +01:00

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