diff options
author | 2017-05-03 13:24:14 +0000 | |
---|---|---|
committer | 2017-05-03 13:24:14 +0000 | |
commit | 6ad0c96f1b4383c3bcd651cc246843119f4e0e61 (patch) | |
tree | f7847d6e4bd7c418461e68d7f689a3a83ebc9b3b /scripts/service.sh | |
parent | 1029ebce0186072709e22a44c2b0cbb5a41a4501 (diff) | |
parent | e385c470ca3c58d5038d50a86380847bb6a5a56b (diff) |
Merge "Reworked helper scripts and fixed typos"
Diffstat (limited to 'scripts/service.sh')
-rwxr-xr-x | scripts/service.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/service.sh b/scripts/service.sh new file mode 100755 index 0000000..ff458bc --- /dev/null +++ b/scripts/service.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [[ $# -ne 2 ]] +then + echo "Must have at least two arguments. The first is name of the service and the second is the action to be done with the service." + exit 1 +fi +for odl_hostname in `grep -Eo 'overcloud-controller-[0-9]' /etc/hosts` +do + echo "Executing service $1 $2 on $odl_hostname" + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $odl_hostname service $1 $2 2> /dev/null +done |