diff --git a/sbin/dm_remote_control.sh b/sbin/dm_remote_control.sh new file mode 100755 index 0000000000000000000000000000000000000000..82e50ca7f3567f221730b01ca5eeba93a5c0e178 --- /dev/null +++ b/sbin/dm_remote_control.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +ACTION=$1 +ACTION=${ACTION:=status} +echo $0: ACTION=$ACTION +echo + +STATION_LIST="CentralStorage:apsgpfs08:ds 1ID:pinotnoir:daq 6IDD:s6iddm:daq 6BM:s6bmdm:daq 7ID:gremlin:daq 8IDI:amethyst:daq 33ID:sis:daq 34IDE:hpcs34:daq" + +for s in $STATION_LIST ; do + stationName=`echo $s | cut -f1 -d':'` + nodeName=`echo $s | cut -f2 -d':'` + scriptName=`echo $s | cut -f3 -d':'` + echo "**********************************" + echo "Station: $stationName ($nodeName)" + ssh dmadmin@$nodeName "/home/dm/production/etc/init.d/dm-${scriptName}-services $ACTION" + echo +done