4
# Reboot all jenkins slaves (!!)
8
if [ -z "$param" ]; then
9
echo "Reboots all jenkins slaves."
10
echo "Potentially dangerous, so you must confirm with YES."
11
echo "Usage: (thisscript).sh YES"
14
if [ "$param" == "YES" ]; then
16
units=$(juju status --format=yaml | egrep "osci-slave/" \
17
| cut -d ":" -f 1 | sed 's/^ *//')
18
for unit in $units; do
19
echo "rebooting ${unit}!"
20
juju ssh $unit "sudo reboot"&