From 9ce23cf1582cfdf475c25fe4fefa35f6471d284c Mon Sep 17 00:00:00 2001
From: Sinisa Veseli <sveseli@aps.anl.gov>
Date: Fri, 27 Jan 2017 15:41:30 +0000
Subject: [PATCH] add remote control script
---
sbin/dm_remote_control.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100755 sbin/dm_remote_control.sh
diff --git a/sbin/dm_remote_control.sh b/sbin/dm_remote_control.sh
new file mode 100755
index 00000000..82e50ca7
--- /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
--
GitLab