EDIT: Title should be Start Services via SSH Hangs! Oops...
I'm trying to write a backup script from one computer to another that will log into the zimbra server, stop services, log out, back it up, log back in, start services, and then log out again.
Everything works peachy, except starting the services again. The script that is doing that looks like this:
Code:
#!/bin/bash
# This script should simply start the zimbra server.
#Login as root to the zimbra server
ssh -T root@192.168.1.132 <<NOMORE
#Start the zimbra server
su - zimbra
zmcontrol start
#Log out of the zimbra server
NOMORE
exit 0
The problem I am having is that it gets most of the job done like so:
Code:
### ZimbraStart.sh
Host mail.michaeljaylissner.com
Starting ldap...Done.
Starting logger...Done.
Starting mailbox...Done.
Starting antispam...Done.
Starting antivirus...Done.
Starting snmp...Done.
Starting spell...Done.
Starting mta...Done.
But then it just hangs there after that last line. The script doesn't end, and thus the backup is not successful.
Any thoughts about why it would just hang once it was NEARLY complete?