... | ... |
@@ -12,20 +12,8 @@ LOG_PATH="/home/$USER/log" |
12 | 12 |
# in the agent script. '60' is the default. Value is in seconds. |
13 | 13 |
POLLING_INTERVAL="60" |
14 | 14 |
|
15 |
- |
|
16 |
-if [ "$HOSTNAME" == "raspi3" ]; then |
|
17 |
- AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
18 |
- SOURCE_URL="http://192.168.1.30:7368/arednsig/" |
|
19 |
-elif [ "$HOSTNAME" == "redwall" ]; then |
|
20 |
- AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
21 |
- SOURCE_URL="http://73.157.139.23:7361/arednsig/" |
|
22 |
-elif [ "$HOSTNAME" == "ka7jlo-web" ]; then |
|
23 |
- AGENT_NAME="[a]rednsigAgent.py" |
|
24 |
- SOURCE_URL="http://ka7jlo-sw-albany-nano-m3.local.mesh/cgi-bin/status" |
|
25 |
-else |
|
26 |
- echo invalid host |
|
27 |
- exit 1 |
|
28 |
-fi |
|
15 |
+AGENT_NAME="[a]rednsigAgent.py" |
|
16 |
+SOURCE_URL="{your Aredn node url}" |
|
29 | 17 |
|
30 | 18 |
PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
31 | 19 |
|
... | ... |
@@ -5,9 +5,6 @@ |
5 | 5 |
# whether your local network uses a domain name server. |
6 | 6 |
# |
7 | 7 |
|
8 |
-AGENT_NAME="[a]rednsigAgent.py" |
|
9 |
-SOURCE_URL="http://localnode.local.mesh/cgi-bin/status" |
|
10 |
- |
|
11 | 8 |
APP_PATH="/home/$USER/bin" |
12 | 9 |
LOG_PATH="/home/$USER/log" |
13 | 10 |
|
... | ... |
@@ -15,6 +12,21 @@ LOG_PATH="/home/$USER/log" |
15 | 12 |
# in the agent script. '60' is the default. Value is in seconds. |
16 | 13 |
POLLING_INTERVAL="60" |
17 | 14 |
|
15 |
+ |
|
16 |
+if [ "$HOSTNAME" == "raspi3" ]; then |
|
17 |
+ AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
18 |
+ SOURCE_URL="http://192.168.1.30:7368/arednsig/" |
|
19 |
+elif [ "$HOSTNAME" == "redwall" ]; then |
|
20 |
+ AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
21 |
+ SOURCE_URL="http://73.157.139.23:7361/arednsig/" |
|
22 |
+elif [ "$HOSTNAME" == "ka7jlo-web" ]; then |
|
23 |
+ AGENT_NAME="[a]rednsigAgent.py" |
|
24 |
+ SOURCE_URL="http://ka7jlo-sw-albany-nano-m3.local.mesh/cgi-bin/status" |
|
25 |
+else |
|
26 |
+ echo invalid host |
|
27 |
+ exit 1 |
|
28 |
+fi |
|
29 |
+ |
|
18 | 30 |
PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
19 | 31 |
|
20 | 32 |
if [ -n "$PROCESS_ID" ]; then |
... | ... |
@@ -5,13 +5,11 @@ |
5 | 5 |
# whether your local network uses a domain name server. |
6 | 6 |
# |
7 | 7 |
|
8 |
-APP_PATH="/home/$USER/bin" |
|
9 |
-LOG_PATH="/home/$USER/log" |
|
10 |
- |
|
11 | 8 |
AGENT_NAME="[a]rednsigAgent.py" |
9 |
+SOURCE_URL="http://localnode.local.mesh/cgi-bin/status" |
|
12 | 10 |
|
13 |
-#NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
14 |
-NODE_URL="http://192.168.1.30:8080/cgi-bin/status" |
|
11 |
+APP_PATH="/home/$USER/bin" |
|
12 |
+LOG_PATH="/home/$USER/log" |
|
15 | 13 |
|
16 | 14 |
# Changing the value overides the default data request interval hardcoded |
17 | 15 |
# in the agent script. '60' is the default. Value is in seconds. |
... | ... |
@@ -26,7 +24,11 @@ if [ -n "$PROCESS_ID" ]; then |
26 | 24 |
else |
27 | 25 |
printf "starting up arednsig agent\n" |
28 | 26 |
cd $APP_PATH |
29 |
- $(./$AGENT_NAME -u $NODE_URL -p $POLLING_INTERVAL >> \ |
|
30 |
- $LOG_PATH/arednsigAgent.log 2>&1 &) |
|
27 |
+ if [ "$1" != "" ]; then |
|
28 |
+ ./$AGENT_NAME $1 -u $SOURCE_URL -p $POLLING_INTERVAL |
|
29 |
+ else |
|
30 |
+ ./$AGENT_NAME -u $SOURCE_URL -p $POLLING_INTERVAL >> \ |
|
31 |
+ $LOG_PATH/arednsigAgent.log 2>&1 & |
|
32 |
+ fi |
|
31 | 33 |
fi |
32 | 34 |
|
1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,32 @@ |
1 |
+#!/bin/bash |
|
2 |
+# |
|
3 |
+# The aredn node url can look something like http://192.168.1.155, or |
|
4 |
+# something linke http://radiationMonitor.domain.com depending on |
|
5 |
+# whether your local network uses a domain name server. |
|
6 |
+# |
|
7 |
+ |
|
8 |
+APP_PATH="/home/$USER/bin" |
|
9 |
+LOG_PATH="/home/$USER/log" |
|
10 |
+ |
|
11 |
+AGENT_NAME="[a]rednsigAgent.py" |
|
12 |
+ |
|
13 |
+#NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
14 |
+NODE_URL="http://192.168.1.30:8080/cgi-bin/status" |
|
15 |
+ |
|
16 |
+# Changing the value overides the default data request interval hardcoded |
|
17 |
+# in the agent script. '60' is the default. Value is in seconds. |
|
18 |
+POLLING_INTERVAL="60" |
|
19 |
+ |
|
20 |
+PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
|
21 |
+ |
|
22 |
+if [ -n "$PROCESS_ID" ]; then |
|
23 |
+ if [ "$1" != "-q" ]; then |
|
24 |
+ printf "arednsig agent running [%s]\n" $PROCESS_ID |
|
25 |
+ fi |
|
26 |
+else |
|
27 |
+ printf "starting up arednsig agent\n" |
|
28 |
+ cd $APP_PATH |
|
29 |
+ $(./$AGENT_NAME -u $NODE_URL -p $POLLING_INTERVAL >> \ |
|
30 |
+ $LOG_PATH/arednsigAgent.log 2>&1 &) |
|
31 |
+fi |
|
32 |
+ |
1 | 1 |
deleted file mode 100755 |
... | ... |
@@ -1,27 +0,0 @@ |
1 |
-#!/bin/bash |
|
2 |
-# |
|
3 |
-# The monitor url can look something like http://192.168.1.155, or |
|
4 |
-# something linke http://radiationMonitor.domain.com depending on |
|
5 |
-# whether your local network uses a domain name server. |
|
6 |
-# |
|
7 |
- |
|
8 |
-APP_PATH="/home/$USER/bin" |
|
9 |
-LOG_PATH="/home/$USER/log" |
|
10 |
- |
|
11 |
-AGENT_NAME="[a]rednsigAgent.py" |
|
12 |
-NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
13 |
- |
|
14 |
-POLLING_INTERVAL="60" |
|
15 |
- |
|
16 |
-PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
|
17 |
- |
|
18 |
-if [ -n "$PROCESS_ID" ]; then |
|
19 |
- if [ "$1" != "-q" ]; then |
|
20 |
- printf "arednsig agent running [%s]\n" $PROCESS_ID |
|
21 |
- fi |
|
22 |
-else |
|
23 |
- printf "starting up arednsig agent\n" |
|
24 |
- cd $APP_PATH |
|
25 |
- $(./$AGENT_NAME -u $NODE_URL -p $POLLING_INTERVAL >> \ |
|
26 |
- $LOG_PATH/arednsigAgent.log 2>&1 &) |
|
27 |
-fi |
... | ... |
@@ -9,8 +9,7 @@ APP_PATH="/home/$USER/bin" |
9 | 9 |
LOG_PATH="/home/$USER/log" |
10 | 10 |
|
11 | 11 |
AGENT_NAME="[a]rednsigAgent.py" |
12 |
-NODE_URL="http://192.168.1.30:8080/cgi-bin/signal.json" |
|
13 |
-#NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
12 |
+NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
14 | 13 |
|
15 | 14 |
POLLING_INTERVAL="60" |
16 | 15 |
|
... | ... |
@@ -9,7 +9,8 @@ APP_PATH="/home/$USER/bin" |
9 | 9 |
LOG_PATH="/home/$USER/log" |
10 | 10 |
|
11 | 11 |
AGENT_NAME="[a]rednsigAgent.py" |
12 |
-NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
12 |
+NODE_URL="http://192.168.1.30:8080/cgi-bin/signal.json" |
|
13 |
+#NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
13 | 14 |
|
14 | 15 |
POLLING_INTERVAL="60" |
15 | 16 |
|
... | ... |
@@ -8,14 +8,8 @@ |
8 | 8 |
APP_PATH="/home/$USER/bin" |
9 | 9 |
LOG_PATH="/home/$USER/log" |
10 | 10 |
|
11 |
-#AGENT_NAME="[a]rednsigAgent.py" |
|
12 |
-#NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
13 |
- |
|
14 | 11 |
AGENT_NAME="[a]rednsigAgent.py" |
15 |
-NODE_URL="http://192.168.1.30:8080/cgi-bin/signal.json" |
|
16 |
- |
|
17 |
-#AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
18 |
-#NODE_URL="http://73.157.139.23:7361/arednsig/dynamic/arednsigOutputData.js" |
|
12 |
+NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
19 | 13 |
|
20 | 14 |
POLLING_INTERVAL="60" |
21 | 15 |
|
... | ... |
@@ -8,13 +8,16 @@ |
8 | 8 |
APP_PATH="/home/$USER/bin" |
9 | 9 |
LOG_PATH="/home/$USER/log" |
10 | 10 |
|
11 |
-if [ `hostname` == "raspi2" ]; then |
|
12 |
- AGENT_NAME="[a]rednsigAgent.py" |
|
13 |
- NODE_URL="-u http://192.168.1.30/cgi-bin/signal.json" |
|
14 |
-else |
|
15 |
- AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
16 |
- NODE_URL="-u http://73.157.139.23:7361/arednsig/dynamic/arednsigOutputData.js" |
|
17 |
-fi |
|
11 |
+#AGENT_NAME="[a]rednsigAgent.py" |
|
12 |
+#NODE_URL="http://localnode:8080/cgi-bin/signal.json" |
|
13 |
+ |
|
14 |
+AGENT_NAME="[a]rednsigAgent.py" |
|
15 |
+NODE_URL="http://192.168.1.30:8080/cgi-bin/signal.json" |
|
16 |
+ |
|
17 |
+#AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
18 |
+#NODE_URL="http://73.157.139.23:7361/arednsig/dynamic/arednsigOutputData.js" |
|
19 |
+ |
|
20 |
+POLLING_INTERVAL="60" |
|
18 | 21 |
|
19 | 22 |
PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
20 | 23 |
|
... | ... |
@@ -25,5 +28,6 @@ if [ -n "$PROCESS_ID" ]; then |
25 | 28 |
else |
26 | 29 |
printf "starting up arednsig agent\n" |
27 | 30 |
cd $APP_PATH |
28 |
- ./$AGENT_NAME $NODE_URL >> $LOG_PATH/arednsigAgent.log 2>&1 & |
|
31 |
+ $(./$AGENT_NAME -u $NODE_URL -p $POLLING_INTERVAL >> \ |
|
32 |
+ $LOG_PATH/arednsigAgent.log 2>&1 &) |
|
29 | 33 |
fi |
1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,29 @@ |
1 |
+#!/bin/bash |
|
2 |
+# |
|
3 |
+# The monitor url can look something like http://192.168.1.155, or |
|
4 |
+# something linke http://radiationMonitor.domain.com depending on |
|
5 |
+# whether your local network uses a domain name server. |
|
6 |
+# |
|
7 |
+ |
|
8 |
+APP_PATH="/home/$USER/bin" |
|
9 |
+LOG_PATH="/home/$USER/log" |
|
10 |
+ |
|
11 |
+if [ `hostname` == "raspi2" ]; then |
|
12 |
+ AGENT_NAME="[a]rednsigAgent.py" |
|
13 |
+ NODE_URL="-u http://192.168.1.30/cgi-bin/signal.json" |
|
14 |
+else |
|
15 |
+ AGENT_NAME="[a]rednsigMirrorAgent.py" |
|
16 |
+ NODE_URL="-u http://73.157.139.23:7361/arednsig/dynamic/arednsigOutputData.js" |
|
17 |
+fi |
|
18 |
+ |
|
19 |
+PROCESS_ID="$(ps x | awk -v a=$AGENT_NAME '$7 ~ a {print $1}')" |
|
20 |
+ |
|
21 |
+if [ -n "$PROCESS_ID" ]; then |
|
22 |
+ if [ "$1" != "-q" ]; then |
|
23 |
+ printf "arednsig agent running [%s]\n" $PROCESS_ID |
|
24 |
+ fi |
|
25 |
+else |
|
26 |
+ printf "starting up arednsig agent\n" |
|
27 |
+ cd $APP_PATH |
|
28 |
+ ./$AGENT_NAME $NODE_URL >> $LOG_PATH/arednsigAgent.log 2>&1 & |
|
29 |
+fi |