Skip to content

Commit

Permalink
Create MonitoringSetup.sh
Browse files Browse the repository at this point in the history
Add MonitoringSetup.sh script to perform steps for modifying the main ToolAnalysis container for use with online monitoring.
Should be run after the first `docker run` to create the monitoring container.
  • Loading branch information
marc1uk authored and Marcus O'Flaherty committed Jul 2, 2024
1 parent d348aa0 commit 7233087
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions MonitoringSetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash
# this file is a shim to perform additional steps that configure the main ToolAnalysis container
# for use with the online Monitoring toolchain. This involves checking out the Monitoring branch,
# configuring the timezone, copying in a slack webhook, and re-building the Analyse executable.

cd /ToolAnalysis;
echo "fetching ToolAnalysis marc1uk fork";
git remote add marc1uk https://github.com/marc1uk/ToolAnalysis.git;
git fetch marc1uk;
echo "checking out monitoring branch";
git checkout --track marc1uk/monitoring_detached;
echo "setting up environment";
. Setup.sh;
echo "building";
make clean;
make -j2;
echo "building again to be sure";
make -j2;
echo "configuring timezone to Chicago time";
if [ -f /etc/localtime ]; then
rm -f /etc/localtime;
fi
if [ -f /usr/share/zoneinfo/America/Chicago ]; then
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime;
else
echo "Chicago timezone not found!"
export TZ=America/Chicago
fi
if [ -f configfiles/Monitoring/slack_webhook ] && [ -f /tmp/slack_webhook ]; then
echo "removing old slack webhook"
rm config/Monitoring/slack_webhook;
fi;
if [ -f /tmp/slack_webhook ]; then
echo "binding in new slack webhook"
ln -s /tmp/slack_webhook configfiles/Monitoring/slack_webhook;
else
echo "new slack webhook not found!"
fi
echo "ToolAnalysis ready: source Setup.sh and run './Analyse Monitoring&'"

0 comments on commit 7233087

Please sign in to comment.