Browse code

added class methods for configuring sensor; added exception catching for json formatting code

Gandolf authored on 06/20/2021 00:40:59
Showing 1 changed files
... ...
@@ -1,5 +1,5 @@
1 1
 #!/bin/bash
2
-# Stop the radmon agent process and clean up environment.
2
+# Stop the node power agent process and clean up environment.
3 3
 
4 4
 AGENT_NAME="[n]pwAgent.py"
5 5
 
Browse code

Initial release

Gandolf authored on 05/29/2021 20:13:39
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,13 @@
1
+#!/bin/bash
2
+# Stop the radmon agent process and clean up environment.
3
+
4
+AGENT_NAME="[n]pwAgent.py"
5
+
6
+PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')"
7
+
8
+if [ -n "$PROCESS_ID" ]; then
9
+  printf "killing node power agent [%s]\n" $PROCESS_ID
10
+  kill $PROCESS_ID
11
+else
12
+  echo node power agent not running
13
+fi