Browse code

minor revision

Gandolf authored on 07/06/2021 21:35:18
Showing 1 changed files
... ...
@@ -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
 
Browse code

minor revision

Gandolf authored on 07/06/2021 21:24:13
Showing 1 changed files
... ...
@@ -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
Browse code

minor revisions

Gandolf authored on 06/21/2021 19:58:00
Showing 1 changed files
... ...
@@ -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
 
Browse code

reorg_20202027

Gandolf authored on 10/27/2020 20:25:34
Showing 1 changed files
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
+
Browse code

support for Aredn FW v3.20.3.0

gandolf authored on 03/31/2020 17:37:45
Showing 1 changed files
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
Browse code

bug fixes

gandolf authored on 01/23/2020 07:04:42
Showing 1 changed files
... ...
@@ -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
 
Browse code

bug fixes

gandolf authored on 01/23/2020 07:00:12
Showing 1 changed files
... ...
@@ -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
 
Browse code

bug fixes

gandolf authored on 01/22/2020 06:07:41
Showing 1 changed files
... ...
@@ -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
 
Browse code

bug fixes

gandolf authored on 01/22/2020 05:51:25
Showing 1 changed files
... ...
@@ -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
Browse code

initial release

gandolf authored on 01/13/2020 03:50:38
Showing 1 changed files
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