Re: CygWin Windows Service support released

From: Robert Collins <robert.collins@dont-contact.us>
Date: Sat, 28 Apr 2001 08:21:13 +1000

----- Original Message -----
From: "Guido Serassio" <serassio@libero.it>
To: <squid-dev@squid-cache.org>
Sent: Saturday, April 28, 2001 4:01 AM
Subject: CygWin Windows Service support released

> Hi,
>
> Today I committed the new source supporting Windows NT services to the
> CygWin branch.
>
> The core code is derived from the 2.3 Stable 4 native NT port, and
seem to
> be very stable.
>
> To enable the service mode, use the --enable-win32-service configure
option
>
> After compiling, make install as usual, but before run it, you must
make
> the following steps:
>
> 1) Run a "squid -i" command.
>
> 2) Change the squid.conf files to reflect physical Windows paths
instead
> CygWin logical paths because the service runs as System Account and
not in
> a full CygWin environment, for the same reason, the cygwin1.dll file
must
> be in your SYSTEM path.
> For example:
>
> cache_access_log /usr/local/squid/logs/access.log
>
> if your CygWin root is d:\cygwin, must be changed to
>
> cache_access_log d:/cygwin/usr/local/squid/logs/access.log

This is not necesary and is bad practice from a cygwin point of view.
The problem you're seeing is that you have no global mount table on that
machine. using mount.exe from cygwin you should run
mount -s d:\\cygwin\\ /
mount -s d:\\cygwin\\bin /bin

and so on. You can use cvs mount to export the mount table as a .reg
file for importing onto another machine.

--->We should not recommend that folk 'workaround' incorrect setups
<----

> 3) Run a "squid -f config-file" command to set in Windows Registry the
> location of config-file
> For example:
>
> squid -f d:/cygwin/usr/local/squid/etc/squid.conf

Why is this needed? For the cygwin linked exe the mount table will let
it find the conf file. Or it is a parameter to the service.

> 4) Run a "squid -z" command as usual if you need to create the cache
> directories.
>
> 5) Start the SquidNT Services from Services Control Panel Applet.
>
> Note:
>
> Is possibile to compile Squid with --prefix=PREFIX and
> --exec-prefix=EPREFIX configure options pointing to Windows physical
paths,
> so you don't need step 2 & 3, but in this manner you need to install
Squid
> manually.

As I mention above, you don't need steps 2 and 3 ever. You simply need a
mount table.

> A last comment on Squid command line switches:
>
> I added two new Squid command line option:
>
> -i : Install the SquidNT Service with automatic startup
> -r: Remove the SquidNT Service
>
> Working switches at the moment:
>
> All -k family, -f (but sets config-files in Windows
Registry), -z, -v, -h

-f shouldn't. -f is used if you want to run two copies of the same
binary with different config files at the same time.

> -N is removed, because non-sense

Please re-instate. It's not nonsense, its incredibly useful.

> The remaining command line switches at the moment don't work.

Why not? Have they been broken in some fashion?

Rob

> Guido
>
>
>
> -
> =======================================================
> Serassio Guido
> Via Albenga, 11/4 10134 -
Torino - ITALY
> Tel. : +39.011.610749
> E-mail: serassio@interfree.it
> serassio@libero.it
> WWW: http://serassio.interfree.it
>
>
Received on Fri Apr 27 2001 - 16:20:07 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:50 MST