summaryrefslogtreecommitdiff
path: root/net/ddclient
diff options
context:
space:
mode:
authorjlam <jlam>2001-12-09 21:44:52 +0000
committerjlam <jlam>2001-12-09 21:44:52 +0000
commit6dffc2dd908a50edd020b6a85cd557ed64c1cd8a (patch)
treedb1021cc72969c17f7eff7abe213e8460447ce20 /net/ddclient
parent9ca3bc424cea7444317716aef16d473e5696e864 (diff)
downloadpkgsrc-6dffc2dd908a50edd020b6a85cd557ed64c1cd8a.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