... | ... |
@@ -1,16 +1,7 @@ |
1 | 1 |
#!/bin/bash |
2 | 2 |
# Stop the radmon agent process. |
3 | 3 |
|
4 |
-if [ "$HOSTNAME" == "raspi3" ]; then |
|
5 |
- AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
6 |
-elif [ "$HOSTNAME" == "redwall" ]; then |
|
7 |
- AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
8 |
-elif [ "$HOSTNAME" == "ka7jlo-web" ]; then |
|
9 |
- AGENT_NAME="[a]rednsigAgent.py" |
|
10 |
-else |
|
11 |
- echo invalid host |
|
12 |
- exit 1 |
|
13 |
-fi |
|
4 |
+AGENT_NAME="[a]rednsigAgent.py" |
|
14 | 5 |
|
15 | 6 |
PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
16 | 7 |
|
... | ... |
@@ -1,7 +1,16 @@ |
1 | 1 |
#!/bin/bash |
2 |
-# Stop the arednsig agent process. |
|
2 |
+# Stop the radmon agent process. |
|
3 | 3 |
|
4 |
-AGENT_NAME="[a]rednsigAgent.py" |
|
4 |
+if [ "$HOSTNAME" == "raspi3" ]; then |
|
5 |
+ AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
6 |
+elif [ "$HOSTNAME" == "redwall" ]; then |
|
7 |
+ AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
8 |
+elif [ "$HOSTNAME" == "ka7jlo-web" ]; then |
|
9 |
+ AGENT_NAME="[a]rednsigAgent.py" |
|
10 |
+else |
|
11 |
+ echo invalid host |
|
12 |
+ exit 1 |
|
13 |
+fi |
|
5 | 14 |
|
6 | 15 |
PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
7 | 16 |
|
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="[a]rednsigAgent.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 arednsig agent [%s]\n" $PROCESS_ID |
|
10 |
+ kill $PROCESS_ID |
|
11 |
+else |
|
12 |
+ echo arednsig agent not running |
|
13 |
+fi |
1 | 1 |
deleted file mode 100755 |
... | ... |
@@ -1,14 +0,0 @@ |
1 |
-#!/bin/bash |
|
2 |
-# Stop the radmon agent process and clean up environment. |
|
3 |
- |
|
4 |
- |
|
5 |
-AGENT_NAME="[a]rednsigAgent.py" |
|
6 |
- |
|
7 |
-PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
|
8 |
- |
|
9 |
-if [ -n "$PROCESS_ID" ]; then |
|
10 |
- printf "killing arednsig agent [%s]\n" $PROCESS_ID |
|
11 |
- kill $PROCESS_ID |
|
12 |
-else |
|
13 |
- echo arednsig agent not running |
|
14 |
-fi |