gpsd/gpsd.init
Douglas E. Warner 532b77d09c - updating to 2.38
- creating init script and sysconfig files
- migrating hotplug rules to udev + hotplug wrapper script from svn r5147
- updating pyexecdir patch
- fixing udev rule subsystem match
- Regression test load for RoyalTek RGM3800 and Blumax GPS-009 added
- Scaling on E error-estimate fields fixed to match O
- Listen on localhost only by default to avoid security problems; this can
    be overridden with the -G command-line option
- The packet-state machine can now recognize RTCM3 packets, though support
    is not yet complete
- Added support for ublox5 and mkt-3301 devices
- Add a wrapper around gpsd_hexdump to save CPU
- Lots of little fixes to various packet parsers
- Always keep the device open: "-n" is not optional any more
- xgpsspeed no longer depends on Motif
- gpsctl can now ship arbitrary payloads to a device; It's possible to send
    binary through the control channel with the new "&" command
- Experimental new driver for Novatel SuperStarII
- The 'g' mode switch command now requires, and returns, 'rtcm104v2' rather
    than 'rtcm104'; this is design forward for when RTCM104v2 is fully
    working
2009-03-16 13:54:41 +00:00

92 lines
2.3 KiB
Bash

#!/bin/sh
#
# gpsd Service daemon for mediating access to a GPS
#
# chkconfig: - 44 66
# description: gpsd is a service daemon that mediates access to a GPS sensor \
# connected to the host computer by serial or USB interface, \
# making its data on the location/course/velocity of the sensor \
# available to be queried on TCP port 2947 of the host computer.
# processname: gpsd
# pidfile: /var/run/gpsd.pid
# http://fedoraproject.org/wiki/FCNewInit/Initscripts
### BEGIN INIT INFO
# Provides: gpsd
# Required-Start: network
# Required-Stop: network
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: Service daemon for mediating access to a GPS
# Description: gpsd is a service daemon that mediates access to a GPS sensor
# connected to the host computer by serial or USB interface, making its
# data on the location/course/velocity of the sensor available to be
# queried on TCP port 2947 of the host computer.
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
exec="/usr/bin/gpsd"
prog=$(basename $exec)
PIDFILE=/var/run/gpsd.pid
CONTROL_SOCKET=/var/run/gpsd.sock
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
OPTIONS="-n"
DEVICE="/dev/ttyUSB0"
lockfile=/var/lock/subsys/$prog
start() {
echo -n $"Starting $prog: "
daemon $exec -p $PIDFILE -F $CONTROL_SOCKET $OPTIONS $DEVICE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
$1
;;
force-reload)
restart
;;
status)
status $prog
;;
try-restart|condrestart)
if status $prog >/dev/null ; then
restart
fi
;;
reload)
status $prog >/dev/null || exit 7
# If config can be reloaded without restarting, implement it here,
# remove the "exit", and add "reload" to the usage message below.
action $"Service $prog does not support the reload action: " /bin/false
exit 3
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
exit 2
esac