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