Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 25462 invoked from network); 7 Jul 2008 15:44:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jul 2008 15:44:48 -0000 Received: (qmail 66997 invoked by uid 500); 7 Jul 2008 15:44:47 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 66981 invoked by uid 500); 7 Jul 2008 15:44:47 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 66970 invoked by uid 99); 7 Jul 2008 15:44:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 08:44:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bruce.snyder@gmail.com designates 74.125.44.155 as permitted sender) Received: from [74.125.44.155] (HELO yx-out-1718.google.com) (74.125.44.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 15:43:53 +0000 Received: by yx-out-1718.google.com with SMTP id 3so422725yxi.86 for ; Mon, 07 Jul 2008 08:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=smaAfTDnxX1lIE5hnIL/sYLDga5n8hh3fg5fcHcIs6c=; b=XNCneFuwzftffmM/hqf6Xmb77cmIc3IiBsxURm7c6Ca2U2q0J9vl7/3RmzzQcslA1V Mv0/Ht6Z8/Pa3hu32nbmAriG1k05OqypWUdd7SJvJYb4Bo1FUOAUNHf0wmjgEyF1DPWb /ldC3hXNtJIzTFANwavCMF1Utm0RbYnr8g4h4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=woh7VOUyHHDeQYsB11skxk6nINipwvF92pDtWiz5itsyJYmJye9IKeB6WqVJjjfFSh VKabAN7N0ztnXyI1xEgEZlYfX3/6WeG4V0oosbO8Mrh2D0Vm05Zb33OTjqXBtqEAwEQw 1dU22Rc6X9gptRmiMnv1nDPsWHR46haeie9Gg= Received: by 10.142.180.11 with SMTP id c11mr1354180wff.113.1215445453617; Mon, 07 Jul 2008 08:44:13 -0700 (PDT) Received: by 10.142.230.2 with HTTP; Mon, 7 Jul 2008 08:44:13 -0700 (PDT) Message-ID: <7b3355cb0807070844y205cbaech82ada24e4482cc60@mail.gmail.com> Date: Mon, 7 Jul 2008 09:44:13 -0600 From: "Bruce Snyder" To: users@activemq.apache.org Subject: Re: runlevel script for debian/ubuntu In-Reply-To: <18237480.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <18237480.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Jul 2, 2008 at 7:28 AM, lkwg82 wrote: > > first repair the start-script, go to the bin directory of activemq > do > # sed -e 's#\r$##g' activemq-admin > activemq-admin.sh && chmod +x > activemq-admin.sh > > this is converting from win32 to linux end of lines and make it executable > as new file > > second, change to root > # su > # cd /etc/init.d/ > # vi activemq > > insert the following code > > > #! /bin/sh > > # the base directory > AMQ_DIR="/home/skype/activemq/apache-activemq-5.1.0/" > > # run the instance as user > AMQ_USER=am > > CMD="nohup $AMQ_DIR/bin/activemq-admin.sh" > > case "$1" in > start) > echo "Starting ActiveMQ " > /bin/su - $AMQ_USER -c "$CMD $1 >/dev/null 2>&1 &" > ;; > stop) > echo "Shutting down ActiveMQ" > /bin/su - $AMQ_USER -c "$CMD $1 >/dev/null 2>&1 &" > ;; > restart) > $0 stop > $0 start > ;; > status) > echo not yet implemented > ;; > *) > echo "Usage: $0 {start|stop|restart|status}" > exit 1 > ;; > esac > > > quit and save > > # chmod +x activemq > > make it executable > > # ln -s /etc/init.d/activemq /etc/rc2.d/S50activemq > > automatic start > > > now, every reboot ur activemq is running > > > Would be nice, if the developer would add this to the documentation! Is there any reason why you can't use the wrapper scripts that ship as part of ActiveMQ?: http://activemq.apache.org/java-service-wrapper.html Bruce -- perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E