From owner-freebsd-questions@FreeBSD.ORG Mon Mar 5 14:49:21 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1D4516A400 for ; Mon, 5 Mar 2007 14:49:21 +0000 (UTC) (envelope-from jean.daigle@SolaceSystems.com) Received: from mail.allstreamits.com (mail.allstreamits.com [66.46.107.253]) by mx1.freebsd.org (Postfix) with ESMTP id 7385F13C4E1 for ; Mon, 5 Mar 2007 14:49:21 +0000 (UTC) (envelope-from jean.daigle@SolaceSystems.com) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 5 Mar 2007 09:37:54 -0500 Message-ID: <6B865826E860EF42B3A387A03F39539616917F69@EX0004.AllstreamITS.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Starting a service on boot Thread-Index: AcdfM9xYQ/QE2JtOTGCan9QH9fWMxA== From: "Jean-Philippe Daigle" To: Subject: Starting a service on boot 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: Mon, 05 Mar 2007 14:49:21 -0000 Hello, I'm attempting to add a new program to the list of services starting at boot time on FreeBSD 6.1. Unfortunately, although running the script directly as root starts it up just fine, it's not starting at boot time. I've found documentation that says there are two basic steps to follow: 1) Create a script named, say, 'foo' starting the program, place it in /etc/rc.d/, and make sure it satisfies a few minimal requirements (see script below). 2) Edit rc.conf to add "foo_enable=3DYES" so the init system knows to start the new program. I've done (2), and here's the script for (1) (anything between <> is me redacting a username, it's obviously not that way in the script): (/etc/rc.d)$ cat cc #!/bin/sh # # PROVIDE: cc # REQUIRE: DAEMON . /etc/rc.subr name=3D"cc" rcvar=3D`set_rcvar` command=3D"/home//cruisecontrol.sh" command_args=3D"&" cc_user=3D"" load_rc_config $name run_rc_command "$1" I can also check if it's enabled: (/etc/rc.d)$ ./cc rcvar=20 # cc $cc_enable=3DYES I haven't found anything interesting in the system logs from the last boot - any ideas why it's not starting up? Thanks -Jean-Philippe Daigle