forked from robotology/icub-main
-
Notifications
You must be signed in to change notification settings - Fork 0
/
icub-cluster
executable file
·56 lines (51 loc) · 1.09 KB
/
icub-cluster
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
source ./cluster-config.sh
case $1 in
check)
for a in $CLUSTERS
do
echo "Going to ping /$a"
if yarp exists /$a; then
echo "Ok, yarp run found on $a"
else
echo "No yarp run found on $a"
fi
done
;;
start)
for a in $CLUSTERS
do
echo "Going to ping /$a"
if yarp exists /$a; then
echo "Ok, yarp run found on $a"
else
echo "Starting yarp run on $a"
ssh -f icub@$a "/etc/init.d/yarprun start"
fi
done
;;
stop)
for a in $CLUSTERS
do
echo "Going to ping /$a"
if yarp exists /$a; then
ssh -f icub@$a "/etc/init.d/yarprun stop"
else
echo "yarp run not running on $a, skipping it"
fi
done
;;
killall)
for a in $CLUSTERS
do
echo "Going to force a killall yarp on /$a"
ssh -f icub@$a "killall yarp"
done
;;
*)
echo "check: checks if yarp run is running"
echo "start: starts yarp run on all machines"
echo "stop: stops yarp run on all machines"
echo "killall: forces a kill of yarp run on all machines"
;;
esac