source: ntrip/trunk/ntripclient/startntripclient.sh@ 8206

Last change on this file since 8206 was 484, checked in by stoecker, 17 years ago

updated, renamed

File size: 747 bytes
Line 
1#!/bin/bash
2#
3# $Id$
4# Purpose: Start ntripclient
5
6# change these 3 according to your needs
7Stream='FFMT0'
8User='user'
9Password='password'
10
11DateStart=`date -u '+%s'`
12SleepMin=10 # Wait min sec for next reconnect try
13SleepMax=10000 # Wait max sec for next reconnect try
14(while true; do
15 ./ntripclient -s www.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
23done)
24
Note: See TracBrowser for help on using the repository browser.