diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2010-10-13 09:32:34 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2010-10-13 09:32:34 +0000 |
commit | d11c652f476f47f8f352727b198c965701a6b3ba (patch) | |
tree | 50cb0c0080e62b6f1d8035d1c9b0bf8f456a6718 /astro | |
parent | 53c24d7d420783ab82580e2722173926012478b7 (diff) | |
download | ports-d11c652f476f47f8f352727b198c965701a6b3ba.tar.gz ports-d11c652f476f47f8f352727b198c965701a6b3ba.zip |
- Add rc.d script
- Bump PORTREVISION
Submitted by: glebius (maintainer)
Approved by: pgollucci (mentor, implicit)
Notes
Notes:
svn path=/head/; revision=262951
Diffstat (limited to 'astro')
-rw-r--r-- | astro/gpxloggerd/Makefile | 2 | ||||
-rw-r--r-- | astro/gpxloggerd/files/gpxloggerd.in | 45 |
2 files changed, 47 insertions, 0 deletions
diff --git a/astro/gpxloggerd/Makefile b/astro/gpxloggerd/Makefile index d0b8313a30d0..cfac10dc5eb1 100644 --- a/astro/gpxloggerd/Makefile +++ b/astro/gpxloggerd/Makefile @@ -7,6 +7,7 @@ PORTNAME= gpxloggerd PORTVERSION= 0.1 +PORTREVISION= 1 CATEGORIES= astro MASTER_SITES= LOCAL/glebius @@ -15,6 +16,7 @@ COMMENT= A daemon that connects to the GPSD daemon and logs GPS traces LIB_DEPENDS= gps.19:${PORTSDIR}/astro/gpsd +USE_RC_SUBR= ${PORTNAME} PLIST_FILES= sbin/${PORTNAME} MAN8= ${PORTNAME}.8 diff --git a/astro/gpxloggerd/files/gpxloggerd.in b/astro/gpxloggerd/files/gpxloggerd.in new file mode 100644 index 000000000000..027b7384c0f6 --- /dev/null +++ b/astro/gpxloggerd/files/gpxloggerd.in @@ -0,0 +1,45 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: gpxloggerd +# REQUIRE: NETWORKING DAEMON cleanvar devfs gpsd +# BEFORE: ntpd +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable gpxloggerd: +# +# gpxloggerd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable gpxloggerd. +# +# gpxloggerd_host (str): Set to "" by default, which is equal +# to "localhost:2947". +# Set to host:port if gpsd is not local. +# +# gpxloggerd_flags (str): Set to "-d" by default. +# +# gpxloggerd_template (str): Set to "/var/log/%d %B %Y - %H:%M.gpx" +# by default. +# +# See gpxloggerd(8) for more info. + +. /etc/rc.subr + +name=gpxloggerd +rcvar=`set_rcvar` + +load_rc_config $name + +# Set defaults +flags="${gpxloggerd_flags:--d}" +template="${gpxloggerd_template:-/var/log/%d %B %Y - %H:%M.gpx}" +user="${gpxloggerd_user:-nobody}" +group="${gpxloggerd_group:-nobody}" +pidfile=/var/run/$name.pid + +command=%%PREFIX%%/sbin/$name +command_args="${flags} -u ${user}:${group} -p ${pidfile} -f \"${template}\" $gpxloggerd_host" + +run_rc_command "$1" |