Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Ralf Habacker" To: Subject: RE: [patch] postgresql 'rc' like start script Date: Mon, 7 Oct 2002 23:49:24 +0200 Message-ID: <008501c26e4b$66759660$686607d5@BRAMSCHE> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: > > > On Mon, Oct 07, 2002 at 12:35:02PM +0200, Ralf Habacker wrote: > > > this patch add a unix like 'rc'-start script for the postgresql server. > > > > > > 2002-10-17 Ralf Habacker > > > > > > rcpostgresql: new file > > > > > > > > > --- /dev/null 2002-10-07 12:30:54.000000000 +0200 > > > +++ /usr/sbin/rcpostgresql 2002-10-07 12:30:41.000000000 +0200 > > > @@ -0,0 +1,2 @@ > > > +/usr/bin/pg_ctl -D /usr/share/postgresql/data -l /var/log/pgsql.log $1 > > > > I appreciate the interest, but what is someone suppose to do with the > > above? > > > > Jason > > Hmm, at a guess, 'cd / && patch -p0 < ralphs_patch'... ;-) > Igor Or copy the part after the + into a file in /usr/sbin/rcpostgresql, as you wish. Anyway, the resulting file should be added to the next postgresql release, if you like. May be this could be the startpoint for a more unix like standardisation of cygwin services like postgresql, apache, cron, inetd apache: (at leased) ln -s /usr/sbin/apachectl /usr/sbin/rcapache For other (net start/stop based services) generic services the following script could be used. The only thing is to activate a service is to link to the below mentioned file. $ less /usr/sbin/rccontrol #!/bin/sh # # generic service starter # # SERVICE=`echo $0 | sed 's#/usr/sbin/rc##g'` if test "$1" = "start"; then net start $SERVICE fi if test "$1" = "stop"; then net stop $SERVICE fi if test "$1" = "status"; then if test "`net start | grep $SERVICE`" != ""; then echo "Service is started" else echo "Service not started" fi fi for example: rccron ln -s /usr/sbin/rccontrol /usr/sbin/rccron Regards Ralf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/