Last change
on this file since 10415 was 9404, checked in by stoecker, 4 years ago |
drop the deprecated www prefix
|
File size:
743 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # $Id$
|
---|
4 | # Purpose: Start ntripclient
|
---|
5 |
|
---|
6 | # change these 3 according to your needs
|
---|
7 | Stream='FFMT0'
|
---|
8 | User='user'
|
---|
9 | Password='password'
|
---|
10 |
|
---|
11 | DateStart=`date -u '+%s'`
|
---|
12 | SleepMin=10 # Wait min sec for next reconnect try
|
---|
13 | SleepMax=10000 # Wait max sec for next reconnect try
|
---|
14 | (while true; do
|
---|
15 | ./ntripclient -s euref-ip.net -r 80 -d $Stream -u $User -p $Password
|
---|
16 | if test $? -eq 0; then DateStart=`date -u '+%s'`; fi
|
---|
17 | DateCurrent=`date -u '+%s'`
|
---|
18 | SleepTime=`echo $DateStart $DateCurrent | awk '{printf("%d",($2-$1)*0.02)}'`
|
---|
19 | if test $SleepTime -lt $SleepMin; then SleepTime=$SleepMin; fi
|
---|
20 | if test $SleepTime -gt $SleepMax; then SleepTime=$SleepMax; fi
|
---|
21 | # Sleep 2 percent of outage time before next reconnect try
|
---|
22 | sleep $SleepTime
|
---|
23 | done)
|
---|
24 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.