aboutsummaryrefslogtreecommitdiff
path: root/monitor_daemon.sh
diff options
context:
space:
mode:
Diffstat (limited to 'monitor_daemon.sh')
-rwxr-xr-xmonitor_daemon.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/monitor_daemon.sh b/monitor_daemon.sh
index 7d976ee..e18720f 100755
--- a/monitor_daemon.sh
+++ b/monitor_daemon.sh
@@ -4,7 +4,12 @@
# echo "you must specify the triggered command"
# exit 1
#fi
-CLIENT="python lab_monitor_client.py"
+if [[ -e client_settings.sh ]]; then
+ source client_settings.sh
+ SOCKET_SPEC="--host $SOCKET_HOST --port $SOCKET_PORT"
+fi
+echo "Reporting to $SOCKET_SPEC"
+CLIENT="python lab_monitor_client.py $SOCKET_SPEC"
function on_exit {
$CLIENT --drop "$JID"
exit 0