From owner-freebsd-questions Sat Jun 15 11:35: 4 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.crackula.com (adsl-64-169-68-38.dsl.snfc21.pacbell.net [64.169.68.38]) by hub.freebsd.org (Postfix) with ESMTP id 3E7E737B427 for ; Sat, 15 Jun 2002 11:34:59 -0700 (PDT) Received: (from monkey@localhost) by mail.crackula.com (8.9.3/8.9.3) id LAA21642; Sat, 15 Jun 2002 11:31:39 -0700 (PDT) Date: Sat, 15 Jun 2002 11:31:39 -0700 From: Adam Weinberger To: =?iso-8859-1?Q?S=F8ren_Neigaard?= Cc: freebsd-questions@FreeBSD.ORG Subject: Re: How do I make a stop script Message-ID: <20020615113139.B3725@crackula.com> References: <547866371.20020615105033@e-box.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: MarioMail Super Nintendo w/ 2 controllers In-Reply-To: <547866371.20020615105033@e-box.dk>; from neigaard@e-box.dk on Sat, Jun 15, 2002 at 10:50:33AM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG you'll probably have the best luck with killall. 1) man killall if it's not there, find the dpkg for it and install it. 2) killall -m '.*proximus.*' (i believe that's the proper syntax for a debian box. run it as a non-root user first, k?) -Adam Søren Neigaard took 1.0K on Sat, Jun 15, 2002 at 10:50:33AM +0200 to say: > I am in urgent need to make a stop script for a Debian machine, I have > asked this question on the Debian list, but this is the fastest and > best list I know of, and since it should be almost the same for > FreeBSD, I will give it a go here too. > > My Debian is running bash. > > I need to make a script that can find the PID for a Java application, > where the process string contains 'proximus', and 'kill -9' that > process. My Java process spawns quite some threads, so I need to kill > the main process, not one of the threads. > > How do I do this, I have no clue, and no shell programming experience, > so please explain it to me carefully, a complete example would just be > great, with some explanation so I don't have to ask again :) > > -- > Med venlig hilsen/Best regards, > Søren Neigaard mailto:neigaard@e-box.dk > -- > "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- "I am disrespectful to dirt! Can you see I am serious!" -Mr. Sparkle Adam Weinberger monkey@crackula.com http://www.crackula.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message