Re: Script not terminating properly
Russell Shaw <[email protected]>
| Newsgroups | gmane.org.user-groups.mlug.main |
|---|---|
| Message-ID | <[email protected]> |
Geoffrey Scott wrote: > I should have given more info shouldn't I..... > > this is the script on the backup server that calls the other on the mail > server: > > #!/bin/bash > > /usr/bin/ssh [email protected] <mailto:[email protected]> > /root/scripts/PrepareForRsync2Fpmelb.sh --stop > > echo "OK. Now we rsync the selected directories" > > /usr/bin/rsync -Razor --delete > --files-from=/root/scripts/mailRsyncFiles.txt \ > mail.guestshire.com:/ /home/backup/mail/ > > /usr/bin/ssh [email protected] <mailto:[email protected]> > "/root/scripts/PrepareForRsync2Fpmelb.sh --start" > > echo "this is the final line from fpmelb's backupmail script" > > So the --stop part of the script successfully completes, then the rsync, > then the --start part to start the services again, then it hangs and > never hands the shell prompt back to the backup server. > > unfortunatley I tried your suggestion and it still hangs......... > > Regards Geoff Scott Maybe you could run the scripts manually on the command line to see what they do. If one of them tries to ask the user/terminal on stdin, that could hang when it's in the background.