File: spot.sh

package info (click to toggle)
freedv 1.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,440 kB
  • sloc: cpp: 8,723; ansic: 3,564; python: 42; makefile: 10; sh: 7
file content (29 lines) | stat: -rw-r--r-- 786 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 "<br>" >> $SPOTFILE
tail -n 25 $SPOTFILE > /tmp/spot.tmp1
mv /tmp/spot.tmp1 $SPOTFILE
lftp -e "cd www;put $SPOTFILE;quit" $FTPSERVER