Date: Tue, 18 Oct 2005 10:44:52 -0500 From: "Andrew L. Gould" <algould@datawok.com> To: "Foo JH" <jhfoo@nexlabs.com> Cc: questions@freebsd.org Subject: Re: why my daemon did not start Message-ID: <20051018104452.1d70f831@grokwell.org> In-Reply-To: <001c01c5d3f9$69b0f790$640a0a0a@gypsy> References: <001c01c5d3f9$69b0f790$640a0a0a@gypsy>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Oct 2005 23:34:15 +0800 "Foo JH" <jhfoo@nexlabs.com> wrote: > 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. I haven't studied up on the rc.subr stuff; but I've noticed that many of the scripts that use it require that an enable line be put in /etc/ rc.conf. Have you tried adding the following line to /etc/rc.conf: portal_enable="YES" Best of luck, Andrew Gould
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051018104452.1d70f831>