From owner-freebsd-questions@FreeBSD.ORG Sun Sep 2 03:17:21 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61D4416A417 for ; Sun, 2 Sep 2007 03:17:21 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.190]) by mx1.freebsd.org (Postfix) with ESMTP id E2B1413C465 for ; Sun, 2 Sep 2007 03:17:20 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so1248728fka for ; Sat, 01 Sep 2007 20:17:09 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=at2cq3ysSHquw0IK8qB8+VBCAcw6cfTsODY3zd2tdcxzP7zI4odJ62rOVYIMx7xvEpgUVkeiJ0SBOYfvIpi0Bv3e8lX9Z3k0p5ekwIRrlaBtSCuRQLGuC2/I9o7CXQCxfC8jILIjMXzybcJsNn92G7fJ3/oed+6hvCyBMw7LmtQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Gikr2XKMCOtBfBxorzny0VmZfMYtD+glF/jRildVKNnjrK7urn64uO72k3/jn7b8wPS4vVzRk9YYSww4pC4BF5blJOYpU4tAQuyBX6D+kDn0h9reg/QbFlX/cWPaPddlNECI+mpeoI+vpsV5AUD5Qs2jRMq9oc7lps7L+IxBmhQ= Received: by 10.82.177.3 with SMTP id z3mr351806bue.1188703028654; Sat, 01 Sep 2007 20:17:08 -0700 (PDT) Received: by 10.82.191.14 with HTTP; Sat, 1 Sep 2007 20:17:08 -0700 (PDT) Message-ID: <80f4f2b20709012017m181fe312s14f7d4f60f9ba295@mail.gmail.com> Date: Sat, 1 Sep 2007 23:17:08 -0400 From: "Jim Stapleton" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: problems with a rc.d script I'm creating 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: Sun, 02 Sep 2007 03:17:21 -0000 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"