From: drowe67 Date: Tue, 15 Sep 2015 02:34:28 +0000 (+0000) Subject: initial demo spotting script X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=16e646f9f0c91db6aa371263b2248ab834caac38;p=freetel-svn-tracking.git initial demo spotting script git-svn-id: https://svn.code.sf.net/p/freetel/code@2332 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/freedv-dev/script/spot.sh b/freedv-dev/script/spot.sh new file mode 100644 index 00000000..cb1309a2 --- /dev/null +++ b/freedv-dev/script/spot.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# spot.sh +# David Rowe Sep 2015 +# + +# Demo script for "spotting" based on FreeDV txt string. Posts a +# date-stamped text file to a web server. Called from FreeDV GUI +# program when a callsign is received in the txt msg. + + +# Q: how to remove repeated spots, or those close in time? +# +# Set up automated lftp login: +# +# $ lftp ftp://username@server +# Password: +# lftp username@server:~> set bmk:save-passwords true +# lftp username@server:~> bookmark add yourserver +# lftp username@server:~> bookmark list +# lftp username@server:~> quit + +SPOTFILE=/home/david/tmp/freedvspot.html +FTPSERVER=ftp.rowetel.com + +echo `date -u` " " $1 "
" >> $SPOTFILE +tail -n 25 $SPOTFILE > /tmp/spot.tmp1 +mv /tmp/spot.tmp1 $SPOTFILE +lftp -e "cd www;put $SPOTFILE;quit" $FTPSERVER