Mail Archives: cygwin/2002/10/07/17:49:33
>
> > 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 <ralf DOT habacker AT freenet DOT de>
> > >
> > > 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/
- Raw text -