summaryrefslogtreecommitdiff
path: root/net/ddclient
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-12-09 21:44:52 +0000
committerjlam <jlam@pkgsrc.org>2001-12-09 21:44:52 +0000
commit6a1f089dcc6718baf3186e15b57b0ad433e9a36f (patch)
treedb1021cc72969c17f7eff7abe213e8460447ce20 /net/ddclient
parent21fa8ca468c3abc90b3159eee54e6ab563af8964 (diff)
downloadpkgsrc-6a1f089dcc6718baf3186e15b57b0ad433e9a36f.tar.gz
"${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.
Diffstat (limited to 'net/ddclient')
-rw-r--r--net/ddclient/files/ddclient.sh16
1 files changed, 12 insertions, 4 deletions
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