From e385c470ca3c58d5038d50a86380847bb6a5a56b Mon Sep 17 00:00:00 2001 From: "juraj.linkes" Date: Tue, 4 Apr 2017 15:04:47 +0200 Subject: Reworked helper scripts and fixed typos Added scripts for odl handling Change-Id: Idf715e1c8357a52ef1cd93f58b87c0b92211f85b Signed-off-by: juraj.linkes --- scripts/service.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/service.sh (limited to 'scripts/service.sh') 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 -- cgit 1.2.3-korg