File: sigmon

package info (click to toggle)
comgt 0.32-3
  • links: PTS
  • area: main
  • in suites: buster, sid, stretch
  • size: 316 kB
  • sloc: ansic: 2,117; makefile: 43; sh: 26
file content (54 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
#
# sigmon - 3G/GPRS datacard signal strength monitor
#
# $Id: sigmon,v 1.1 2006/10/20 14:19:54 pharscape Exp $
#

if [ $# -eq 1 ]
then
	if [ "$1" = '-?' ] 
	then
		echo "Syntax:   sigmon"
		echo "Function: 3G/GPRS datacard signal strength monitor"
		echo "Options:  none"
	else
		echo "Invalid option - $1"
	fi
	exit 1
else
	if [ $# -gt 1 ]
	then
		echo "Error: only one option permitted"
		exit 1
	fi
fi

echo "Use Ctrl/C to terminate monitoring"

while true
do
	comgt -d /dev/ttyUSB2 sig
	sleep 5
done
#
#   sigmon - use comgt to continuously monitor signal strength
#   Copyright (C) 2005  Martin Gregorie
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#    martin@gregorie.org
#