From owner-freebsd-questions@FreeBSD.ORG Tue Oct 18 15:34:23 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3013D16A41F for ; Tue, 18 Oct 2005 15:34:23 +0000 (GMT) (envelope-from jhfoo@nexlabs.com) Received: from eastgate.starhub.net.sg (eastgate.starhub.net.sg [203.116.1.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E7FB43D45 for ; Tue, 18 Oct 2005 15:34:21 +0000 (GMT) (envelope-from jhfoo@nexlabs.com) Received: from gypsy ([222.165.90.189]) by eastgate.starhub.net.sg (8.12.5/8.12.5) with SMTP id j9IFYJpv023652 for ; Tue, 18 Oct 2005 23:34:19 +0800 (SST) Message-ID: <001c01c5d3f9$69b0f790$640a0a0a@gypsy> From: "Foo JH" To: Date: Tue, 18 Oct 2005 23:34:15 +0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: why my daemon did not start X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 15:34:23 -0000 Hi all, I'm trying to write a simple RC script to run my little Perl = script as a daemon. The script is as follows: #!/bin/sh portal_enable=3D${portal_enable-"NO"} portal_flags=3D${portal_flags-""} portal_pidfile=3D"/var/run/portald.pid" . /etc/rc.subr name=3D"portald" rcvar=3D`set_rcvar` command=3D"/home/admin/perfectportal/portald.pl &" load_rc_config $name pidfile=3D"${portal_pidfile}" start_cmd=3D"echo \"Starting ${name}.\"; /usr/bin/nice -5 ${command} = ${portal_flags} ${command_args}" stop_cmd=3D"kill `cat /var/run/portald.pid`" run_rc_command "$1" If I were to run this manually via=20 /usr/local/etc/rc.d/portald.sh start it works. but in a reboot, it does not start. Can anyone guide me where to find the error message, or (even better) = what may be the problem? Thanks.