Re: Script not terminating properly
Will Wheatley <[email protected]>
| Newsgroups | gmane.org.user-groups.mlug.main |
|---|---|
| Message-ID | <[email protected]> |
Hi, What i think is happening..... one of the scripts you are calling is spawning a child process (obviously as it is starting your process :) The bash process that is processing your script is actually waiting for one or more child processes to exit, so it seems to hang... I would think its the following line /root/scripts/dumpOXexpectScrpt.exp /var/backups/openexchangedb.out \ $DEFAULT_SQL_DB $DEFAULT_SQL_USER $DEFAULT_SQL_PASS only because the init.d scripts usually spawn correctly :) you could try putting a & at the end of the line above .... and seeing if it still hangs? On 11/3/05, Geoffrey Scott <[email protected]> wrote: > > Russell Shaw wrote: > > Geoffrey Scott wrote: > >> Hi ppl, > >> I can't for the life of me figure out why this script below doesn't > >> finish. Can anyone see what I have done wrong? > >> > >> #!/bin/bash > >> . /usr/local/open-xchange/etc/admintools.conf > >> > >> if [ "$1" = "--stop" ] > >> then... > > > > It's easiest to put: echo "passNNN" statements on every few lines. > > > That's what I did when I stuck in the > echo `date` > echo "all done" > > Lines at the end. It gets to echoing "all done" and then stops. This > script is actually called from my main backup server, hence the --start > and > --stop. > > > Regards Geoff Scott > > > _______________________________________________ > Melbourne Linux Users Group (Australia) > Edit your settings: http://lists.mlug.org.au >