From 0ebe9ba73054950e05a8904107e8341219755411 Mon Sep 17 00:00:00 2001 From: jlam Date: Sun, 9 Dec 2001 21:44:52 +0000 Subject: "${command}" must be "perl" or else the rc.subr routines can't figure out the pid of the daemon process. Rework this rc.d script as a model for other perl-script daemons to use. --- net/ddclient/files/ddclient.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'net/ddclient') diff --git a/net/ddclient/files/ddclient.sh b/net/ddclient/files/ddclient.sh index 9b21bb18ebd..8453f43e1fc 100644 --- a/net/ddclient/files/ddclient.sh +++ b/net/ddclient/files/ddclient.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: ddclient.sh,v 1.1 2001/12/09 19:55:36 jlam Exp $ +# $NetBSD: ddclient.sh,v 1.2 2001/12/09 21:44:52 jlam Exp $ # # Dynamic DNS update client # @@ -14,16 +14,24 @@ fi name="ddclient" rcvar=${name} -command="@PREFIX@/sbin/${name}" +command="@PERL5@" +daemon="@PREFIX@/sbin/${name}" pidfile="/var/run/${name}.pid" -required_files="@PERL5@ @PKG_SYSCONFDIR@/${name}.conf" +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 [ -e /etc/rc.subr ] then load_rc_config $name run_rc_command "$1" else @ECHO@ -n " ${name}" - ${command} ${ddclient_flags} ${command_args} + ${daemon} ${ddclient_flags} ${command_args} fi -- cgit v1.2.3