Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2007 23:17:08 -0400
From:      "Jim Stapleton" <stapleton.41@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   problems with a rc.d script I'm creating
Message-ID:  <80f4f2b20709012017m181fe312s14f7d4f60f9ba295@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I'm trying to create an rc.d script to start akpop3d (it doesn't seem
to come with one).

According to the documentation on run_rc_command in /etc/rc.subr, I
thought this should work. However I get no response when I run
'/usr/local/etc/rc.d/akpop3d start', and ps -A doesn't show an akpop3d
process. When I run it manually (akpop3d -d -s -L .akpop3d), it starts
just fine.

Could anyone suggest what I am missing here?

Thanks,
-Jim Stapleton

The script:

#!/bin/sh
#
# $FreeBSD: N/A
#
# PROVIDE: akpop3d
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf to enable akpop3d:
#
# akpop3d_enable="YES"
#


akpop3d_enable=${akpop3d_enable-"NO"}
akpop3d_pidfile=${akpop3d_pidfile-"/var/run/akpop3d.pid"}
akpop3d_flags=${akpop3d_flags-"-d -s -L .akpop3d"}
akpop3d_conffile=${akpop3d_conffile-""}
akpop3d_flush_cache=${akpop3d_flush_cache-"NO"}

. /etc/rc.subr


if [ ! -z $(check_pidfile $akpop3d_pidfile akpop3d) ]
then

else

fi

name=akpop3d
rcvar=`set_rcvar`

command=/usr/local/bin/${name}
pidfile=${akpop3d_pidfile}
#start_precmd=akpop3d_precmd

load_rc_config ${name}



run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80f4f2b20709012017m181fe312s14f7d4f60f9ba295>