Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2005 23:34:15 +0800
From:      "Foo JH" <jhfoo@nexlabs.com>
To:        <questions@freebsd.org>
Subject:   why my daemon did not start
Message-ID:  <001c01c5d3f9$69b0f790$640a0a0a@gypsy>

index | next in thread | raw e-mail

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=${portal_enable-"NO"}
portal_flags=${portal_flags-""}
portal_pidfile="/var/run/portald.pid"

. /etc/rc.subr

name="portald"
rcvar=`set_rcvar`
command="/home/admin/perfectportal/portald.pl &"

load_rc_config $name
pidfile="${portal_pidfile}"
start_cmd="echo \"Starting ${name}.\"; /usr/bin/nice -5 ${command} ${portal_flags} ${command_args}"
stop_cmd="kill `cat /var/run/portald.pid`"
run_rc_command "$1"

If I were to run this manually via 
/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.


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001c01c5d3f9$69b0f790$640a0a0a>