1 | 1 |
deleted file mode 100755 |
... | ... |
@@ -1,22 +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 |
-MONITOR_URL="{your monitor url}" |
|
8 |
- |
|
9 |
-APP_PATH="/home/$USER/bin" |
|
10 |
-LOG_PATH="/home/$USER/log" |
|
11 |
- |
|
12 |
-PROCESS_ID="$(ps x | awk '/[r]admonAgent.py/{print $1}')" |
|
13 |
- |
|
14 |
-if [ -n "$PROCESS_ID" ]; then |
|
15 |
- if [ "$1" != "-q" ]; then |
|
16 |
- printf "radmon agent running [%s]\n" $PROCESS_ID |
|
17 |
- fi |
|
18 |
-else |
|
19 |
- printf "starting up radmon agent\n" |
|
20 |
- cd $APP_PATH |
|
21 |
- ./radmonAgent.py -t 10 -u $MONITOR_URL >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
22 |
-fi |
1 | 1 |
old mode 100644 |
2 | 2 |
new mode 100755 |
... | ... |
@@ -1,5 +1,10 @@ |
1 | 1 |
#!/bin/bash |
2 | 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 |
+MONITOR_URL="{your monitor url}" |
|
3 | 8 |
|
4 | 9 |
APP_PATH="/home/$USER/bin" |
5 | 10 |
LOG_PATH="/home/$USER/log" |
... | ... |
@@ -13,5 +18,5 @@ if [ -n "$PROCESS_ID" ]; then |
13 | 18 |
else |
14 | 19 |
printf "starting up radmon agent\n" |
15 | 20 |
cd $APP_PATH |
16 |
- ./radmonAgent.py -t 10 -u 'http://73.157.139.23:4371' >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
21 |
+ ./radmonAgent.py -t 10 -u $MONITOR_URL >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
17 | 22 |
fi |
... | ... |
@@ -1,7 +1,8 @@ |
1 | 1 |
#!/bin/bash |
2 | 2 |
# |
3 |
-APP_PATH="/home/{user}/bin" |
|
4 |
-LOG_PATH="/home/{user}/log" |
|
3 |
+ |
|
4 |
+APP_PATH="/home/$USER/bin" |
|
5 |
+LOG_PATH="/home/$USER/log" |
|
5 | 6 |
|
6 | 7 |
PROCESS_ID="$(ps x | awk '/[r]admonAgent.py/{print $1}')" |
7 | 8 |
|
... | ... |
@@ -12,5 +13,5 @@ if [ -n "$PROCESS_ID" ]; then |
12 | 13 |
else |
13 | 14 |
printf "starting up radmon agent\n" |
14 | 15 |
cd $APP_PATH |
15 |
- ./radmonAgent.py -t 10 -u 'http://73.157.139.23:4371/jsdata' >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
16 |
+ ./radmonAgent.py -t 10 -u 'http://73.157.139.23:4371' >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
16 | 17 |
fi |
... | ... |
@@ -1,15 +1,16 @@ |
1 | 1 |
#!/bin/bash |
2 | 2 |
# |
3 |
-APP_PATH="/home/pi/bin/" |
|
4 |
-LOG_PATH=/tmp/log |
|
5 |
- |
|
6 |
-cd $APP_PATH |
|
7 |
- |
|
8 |
-# First start up RR database update app |
|
3 |
+APP_PATH="/home/{user}/bin" |
|
4 |
+LOG_PATH="/home/{user}/log" |
|
9 | 5 |
|
10 | 6 |
PROCESS_ID="$(ps x | awk '/[r]admonAgent.py/{print $1}')" |
7 |
+ |
|
11 | 8 |
if [ -n "$PROCESS_ID" ]; then |
12 |
- printf "radmon agent running [%s]\n" $PROCESS_ID |
|
9 |
+ if [ "$1" != "-q" ]; then |
|
10 |
+ printf "radmon agent running [%s]\n" $PROCESS_ID |
|
11 |
+ fi |
|
13 | 12 |
else |
14 |
- ./radmonAgent.py -t 5 -u 'http://73.157.139.23:4371' >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
13 |
+ printf "starting up radmon agent\n" |
|
14 |
+ cd $APP_PATH |
|
15 |
+ ./radmonAgent.py -t 10 -u 'http://73.157.139.23:4371/jsdata' >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
15 | 16 |
fi |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,15 @@ |
1 |
+#!/bin/bash |
|
2 |
+# |
|
3 |
+APP_PATH="/home/pi/bin/" |
|
4 |
+LOG_PATH=/tmp/log |
|
5 |
+ |
|
6 |
+cd $APP_PATH |
|
7 |
+ |
|
8 |
+# First start up RR database update app |
|
9 |
+ |
|
10 |
+PROCESS_ID="$(ps x | awk '/[r]admonAgent.py/{print $1}')" |
|
11 |
+if [ -n "$PROCESS_ID" ]; then |
|
12 |
+ printf "radmon agent running [%s]\n" $PROCESS_ID |
|
13 |
+else |
|
14 |
+ ./radmonAgent.py -t 5 -u 'http://73.157.139.23:4371' >> $LOG_PATH/radmonAgent.log 2>&1 & |
|
15 |
+fi |