This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: cygwin service
Hallo Christoffer,
Friday, October 4, 2002, 1:58:28 PM, you wrote:
CW> I can see the sshd runs as 'service' even when I close the
CW> shell window, thats nice. I wanted to do the same with apache,
CW> I did: '/sbin/cygrunsrv -I apache -p /usr/sbin/apachectl -a start'
CW> However, when I do: '/bin/cygrunsrv -S apache', I get :
A "ps -aW" should show apache running nevertheless.
CW> ".. error startign service, QueryServiceStatus: win32 error 1062:
CW> The service has not been started".
CW> How can I correct this, or where can I find documentation on this?
Ahh - I can help here.
In the documentation for cygrunsrv (/usr/doc/Cygwin/cygrunsrv.README)
under General Notes you'll see that the daemon has to be started
without forking a child and then exiting - what usualy daemons do.
Run "/usr/sbin/httpd -h" for help on httpd.
There you'll see the switch for starting apache without forking into
background is "-k"
Use: "/bin/cygrunsrv -I apache -p /usr/sbin/httpd -a '-k' " instead.
Ciao
Uwe mailto:merkosh@planet-interkom.de
--
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/