What constitutes a daemon? It's just a shell script: while do done It's not supposed to terminate but will if errors are encountered. The script I was testing did not have the while loop, so it would have terminated. ----- Original Message ----- From: "Gerrit P. Haase" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 28, 2001 2:14 PM Subject: Re: Running a shell script as a service
> Hallo Daniel, > > Am 2001-11-28 um 22:17 schriebst du: > > > OK, this part works ok: > > cygrunsrv --install KSEZip --path /home/user/test.sh > > > but starting the service gives me a dialog box: > > "Could not start the KSEZip service on \\KILO. > > Error 2140: An internal Windows NT error occurred." > > > The application event log contains: > > "The description for Event ID (0) in Source (KSEZip) could not be found. It > > contains the following insertion string(s)" KSEZip: Win32 process Id = > > 0x195: Cygwin Process Id = 0x195: 'KSEZip' service stopped." > > Is it a daemon? If the script terminates itself it cannot run as service. > I tried with a terminating perl script, it is executed but after exiting I > get exactly this error. > > And I suggest better call bash with the script as argument: > > $ cygrunsrv -I cygtest -d "Cygwin test" -p /bin/perl.exe -a /test.pl > > Start the service (two tests): > > $ cat /var/log/cygtest.log > Test. > Test. > > $ cat test.pl > #!/usr/bin/perl > > print "Test.\n"; > > $ delsrv cygtest > The command completed successfully. > > Ciao, > > Gerrit P. Haase mailto:[EMAIL PROTECTED] > -- > =^..^= > > > -- > 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/ > -- 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/