Browse code

minor revision

Gandolf authored on 07/06/2021 21:30:56
Showing 1 changed files
... ...
@@ -1,7 +1,9 @@
1 1
 #!/bin/bash
2
-# Stop the radmon agent process and clean up environment.
2
+# Stop the radmon agent process.
3 3
 
4
-PROCESS_ID="$(ps x | awk '/[r]admonAgent.py/{print $1}')"
4
+AGENT_NAME="[r]admonAgent.py"
5
+
6
+PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')"
5 7
 
6 8
 if [ -n "$PROCESS_ID" ]; then
7 9
   printf "killing radmon agent [%s]\n" $PROCESS_ID
Browse code

minor revisions

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