From owner-freebsd-questions@FreeBSD.ORG Fri May 4 12:25:06 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 1515F16A400 for ; Fri, 4 May 2007 12:25:06 +0000 (UTC) (envelope-from charlie.mas@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id CAEBB13C457 for ; Fri, 4 May 2007 12:25:05 +0000 (UTC) (envelope-from charlie.mas@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so856466ana for ; Fri, 04 May 2007 05:25:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=uacjpdprxp7DlCvsq7k1zzsP8Te7EjexWcDecmU6rkyiN7zQtabkN/ZRi+QmKwtnj8llZjxQJrcCAOaUBzhzljUVz7DkxF9hO8sukkiZYmcsmw/UuwSRW9+gQlG12jXA+sMlg/mUV3vRl2iEMg59rD3v045nJ1TLocvPT18pFZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=pym2OQC4JpxUV1ZdwlEBQuTKmiPr4eolJSqdduB/aZHrF9m+1iNTNOJo2n3mJ+kPIBntMi/oK9N0bq6Udr6r0zJzcWx3XQMMnvlOC4sSTOI/0XrXppzDhCVLTh/peQUt1XLAQQun+yLVNSBABIIOJwcroqsIyuL7ZcOK1QmnR8A= Received: by 10.100.201.11 with SMTP id y11mr2573284anf.1178279989944; Fri, 04 May 2007 04:59:49 -0700 (PDT) Received: by 10.100.152.6 with HTTP; Fri, 4 May 2007 04:59:49 -0700 (PDT) Message-ID: <1960fb140705040459w6631adeanc901b8c09806d12a@mail.gmail.com> Date: Fri, 4 May 2007 12:59:49 +0100 From: "Charles Mason" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Creating an rc.d script for Jboss Web X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: charlie@cpsoftware.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2007 12:25:06 -0000 I am trying to run Jboss Web on FreeBSD, which is basically a Tomcat derived web server which use APR to replace the Java based static file serving in Tomcat. This makes it much faster but requires the native modules to be complied for each platform. I have successfully managed to compile these and it appears to all work very well. My problem is creating an rc.d script to start and run it as a daemon. To start Jboss Web there is an sh script called run.sh which after a bit of config runs the JVM and the relevant JARS. I created a simple rc.d script to run this. My problem is running the script does not run Jboss Web as a daemon instead it runs it as if running ./run.sh from the terminal and halts the rc.d process. The Jboss Web server is actually working, its just not ideal. I have included the current script below. #!/bin/sh . /etc/rc.subr name="JbossWeb" rcvar=`set_rcvar` command="/etc/JbossWeb/bin/run.sh" command_interpreter="/bin/sh" load_rc_config $name run_rc_command "$1" How can I change the script to run run.sh in the background and continue the rc.d system. Charlie