1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00
freebsd-ports/net/ntimed/files/ntimed.in
Kubilay Kocak 228e65a91b net/ntimed: Add rc startup script
- Add ntimed rc script
- Tweak GH_PROJECT, remove WRKSRC override accordingly
- Remove trailing newline (portlint)

Approved by:	maintainer
2014-12-22 03:55:43 +00:00

39 lines
683 B
Bash

#!/bin/sh
#
# Author: Mark Felder <feld@FreeBSD.org>
#
# $FreeBSD$
#
# PROVIDE: ntimed
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable ntimed:
# ntimed_enable="YES"
# ntimed_flags="<set as needed>"
. /etc/rc.subr
name=ntimed
rcvar=ntimed_enable
load_rc_config $name
: ${ntimed_enable:=NO}
: ${ntimed_flags:="0.freebsd.pool.ntp.org"}
start_precmd=ntimed_prestart
pidfile=/var/run/ntimed.pid
procname="/usr/local/sbin/ntimed-client"
command=/usr/sbin/daemon
command_args=" -p ${pidfile} ${procname} ${ntimed_flags}"
ntimed_prestart()
{
# Have to empty rc_flags so they don't get passed to daemon(8)
rc_flags=""
}
run_rc_command "$1"