Advertisement

09.18.2007 at 07:24AM PDT, ID: 22836009
[x]
Attachment Details

Creating a daemon script

Asked by blcarter14 in Bourne-Again Shell (bash), Linux Programming, Shell Scripting

Tags: bash, script, daemon

I have a bash script that monitors a log file using swatch.  I have had problems with swatch after the log file is rotated, so I setup a cron job to restart the script after the log file rotation, however this introduces a new problem.  the daemon script I use to start swatch in the background becomes unavailable to me, so I end up with many defunct process, or child process that I cannot kill. What is the best way to create a deamon script (in /etc/init.d) that will call my bash script, yet all me to keep control of it and any child processes.  The prog needs to run in the background.Start Free Trial
 
Loading Advertisement...
 
[+][-]09.18.2007 at 12:19PM PDT, ID: 19915786

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.18.2007 at 12:23PM PDT, ID: 19915813

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.18.2007 at 12:38PM PDT, ID: 19915934

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.18.2007 at 01:02PM PDT, ID: 19916117

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.18.2007 at 06:55PM PDT, ID: 19917901

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 05:15AM PDT, ID: 19919908

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.23.2007 at 11:04AM PDT, ID: 19944945

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 05:13AM PDT, ID: 20176280

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11.03.2007 at 09:47PM PDT, ID: 20209582

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Bourne-Again Shell (bash), Linux Programming, Shell Scripting
Tags: bash, script, daemon
Sign Up Now!
Solution Provided By: Computer101
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628