summaryrefslogtreecommitdiff
path: root/net/ddclient/files/ddclient.sh
blob: 26ecc94f0c6c93ed77a742560583e5799004b653 (plain)
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
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: ddclient.sh,v 1.4 2002/09/20 02:01:57 grant Exp $
#
# Dynamic DNS update client
#
# PROVIDE: ddclient
# REQUIRE: DAEMON

if [ -f /etc/rc.subr ]
then
	. /etc/rc.subr
fi

name="ddclient"
rcvar=${name}
command="@PERL5@"
daemon="@PREFIX@/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="${daemon} @PKG_SYSCONFDIR@/${name}.conf"
start_cmd="ddclient_start"
extra_commands="reload"

ddclient_start()
{
	@ECHO@ "Starting ${name}."
	${daemon} ${ddclient_flags} ${command_args}
}

if [ -f /etc/rc.subr ]
then
	load_rc_config $name
	run_rc_command "$1"
else
	@ECHO@ -n " ${name}"
	${daemon} ${ddclient_flags} ${command_args}
fi