|
|
scripting error wont exit
I am writing a script that calls multiple scripts, basically, shut down
database, do backup, bring app back up. I am running this as a cron that
logs it to a file.
The problem being is that when the app comes back up it starts sending data
frequently about the app to the screen that brought the app up. Which means
the log file that I had the cron job write to is still collecting stats and
is still open.
How do I end the script is it just...
EOF
|
|
0
|
|
|
|
Reply
|
LHradowy
|
8/11/2003 4:09:13 PM |
|
In article <KcPZa.31863$Rz6.46245@news1.mts.net>,
LHradowy <laura.hradowy@NOSPAM.mts.ca> wrote:
>I am writing a script that calls multiple scripts, basically, shut down
>database, do backup, bring app back up. I am running this as a cron that
>logs it to a file.
>
>The problem being is that when the app comes back up it starts sending data
>frequently about the app to the screen that brought the app up. Which means
>the log file that I had the cron job write to is still collecting stats and
>is still open.
>
>How do I end the script is it just...
Redirect output for the command that starts the app back up:
start_app_up >/dev/null 2>&1
However, this has the misfeature of also losing any error messages that the
startup command might display.
The *right* solution is for the startup command to redirect its own stdout
and stderr when it forks off into a daemon.
--
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
|
|
0
|
|
|
|
Reply
|
Barry
|
8/11/2003 5:47:40 PM
|
|
|
1 Replies
183 Views
(page loaded in 0.043 seconds)
Similiar Articles: comp.sys.hp.hpux - page 13scripting error wont exit 1 135 (8/11/2003 4:09:13 PM) I am writing a script that calls multiple scripts, basically, shut down database, do backup, bring app back up. AWK question - split string into variables - comp.unix.shell ...... enters a date parameter as follows: -a "begin time" Job will not ... character > * check length of array - if not 2 - 4 then print error msg and exit > the script ... Stopping user from exiting program - comp.databases.filemaker ...... loops in pause / resume mode, you need to be very careful with error ... to get them to remember to do it is killing >> > me b/cthe script will not run when they exit ... set command will not allow parameters with leading minus "-option ...... through a case statement from one script ... DoUsage echo "Error processing option: $1\n" exit 1 esac ... SET command will not allow an equal sign to ... Capture windows command return code to variable in awk script ...... Can't find the program " > "/dev/stderr"; exit 1; } When I invoke this script ... but I either get no change in output or syntax errors that prevent the script ... How to Save Records with Only Buttons I create, and prevent ...Then you connect the script on field exit. > > > > Lars ... and put them into a Pause in the script. Make sure that Set Error Capture is ON, so the dialogs will not appear. Create Multiple Users on Solaris 10 - comp.unix.solarisI can create a script to run useradd - but is there a ... >&2 exit 2 fi echo "$instructor" } if ... If not, accounts" echo "will not have passwords (users are ... How to test if stdout == stderr? - comp.unix.programmer... perror( "fstat" ); > exit( EXIT_FAILURE ... Write to stderr? - comp.lang.rexx Here is a script called ... SetStdHandle - comp.os.ms ... how to suppress error ... SIGCHLD, fork() and sleep() - comp.unix.programmerAs I ignore SIGCHLD signal the children wont notify the ... If i quickly fork children processes and quickly exit ... out then when you use pcntl_signal in a 'deamon' script ... /bin/sh: Local variables in a function ? - comp.unix.solaris ...While my current script works excellent on the Korn ... the shebang into /bin/sh it will produce an error about ... sub process can use the variable, but any mods will not ... How to troubleshoot script errors in Internet ExplorerDescribes how to troubleshoot the following script error: "Problems with this Web page might prevent it from being displayed properly. In the future, you ... Exit - Terminate a script - SS64EXIT. Quit the current batch script, quit the current subroutine or quit the command processor (CMD ... VERIFY - Provides an alternative method of raising an error level ... 7/26/2012 7:26:06 AM
|
|
|
|
|
|
|
|
|