Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com> List-Archive: <http://sources.redhat.com/ml/cygwin/> List-Post: <mailto:cygwin AT sources DOT redhat DOT com> List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <01e001c1786a$88beb2b0$2701010a@crosstrust.com> From: "Daniel Meier" <dmeier AT crosstrust DOT com> To: "Gerrit P. Haase" <cygwin AT cygwin DOT com> References: <019201c17852$271edcf0$2701010a AT crosstrust DOT com> <194351158649 DOT 20011128231436 AT familiehaase DOT de> Subject: Re: Running a shell script as a service Date: Wed, 28 Nov 2001 16:12:29 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 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" <gp AT familiehaase DOT de> To: <cygwin AT cygwin DOT com> 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:gp AT familiehaase DOT 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/ > -- 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/