delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/21/12:24:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Reply-To: Cygwin List <cygwin AT cygwin DOT com>
Message-Id: <6.0.1.1.0.20040121121907.027f4668@127.0.0.1>
X-Sender:
Date: Wed, 21 Jan 2004 12:23:58 -0500
To: "Edward W. Rouse" <erouse AT comsquared DOT com>, <cygwin AT cygwin DOT com>
From: Larry Hall <cygwin-lh AT cygwin DOT com>
Subject: Re: simple newbie init question
In-Reply-To: <002b01c3e032$f6ea1b30$353d520a@EROUSE>
References: <NUTMEGxVDaSU7H3QtiZ00000173 AT NUTMEG DOT CAM DOT ARTIMI DOT COM> <002b01c3e032$f6ea1b30$353d520a AT EROUSE>
Mime-Version: 1.0

At 10:26 AM 1/21/2004, Edward W. Rouse you wrote:
>I have installed Cygwin 1.5.5 on a Win2000 box. I included all of the
>packages, just to be safe. But I can't figure out where to add services
>to the init process. cygwin.bat starts the bash shell fine and I have
>set the PATH and some variables there.
>
>I want to start PostgreSQL and cvs only when I have the Cygwin session
>window open. Where do I put the commands? I have created a script to
>start and stop these services from the command line, but would really
>like to automate the process.
>
>I am more familiar with the way SuSE works and following the RedHat
>reference guide did not help. I searched the archives and the Cygwin
>documentation but didn't find anything that addresses starting and
>stopping services when using the bash shell.
>
>I did see someone mention a .bash-shutdown file. Is there also a
>.bash-startup file and where would it go? Or am I supposed to use the
>/etc/defaults/etc/bash.bashrc file?


This sounds more like a generic bash question than a Cygwin one but I'll
bite.  If you'll only ever have one window started from cygwin.bat open
at a time, just add the start-up to ~/.bash_login and the shutdown to 
~/.bash_logout.  If you'll have more than one window open at a time, you'll
want to add some logic to avoid multiple attempts to start and stop these
services.

HTH,


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019