useful_scripts/check_mongo_status_py.sh

13 lines
270 B
Bash
Raw Permalink Normal View History

#!/bin/bash
machine=${1:-0}
model=${2:-controller}
read -d '' -r cmds <<'EOF'
sudo apt -y install python3-pymongo > /dev/null 2>&1
sudo python3 /home/ubuntu/check_mongo.py
EOF
juju scp -m ${model} check_mongo.py ${machine}:.
juju ssh -m ${model} ${machine} "${cmds}"