Script not terminating properly

"Geoffrey Scott" <[email protected]>
Newsgroups gmane.org.user-groups.mlug.main
Message-ID <[email protected]>
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
        echo "At this point in the script we shut things down and dump the
pgsql db"

# Shutdown services for Rsync of their files

/etc/init.d/openexchange stop
/etc/init.d/postfix stop
/etc/init.d/cyrus21 stop
/etc/init.d/tomcat4 stop
/etc/init.d/postgresql stop

# Then dump out the Postgresql database

# This script is used like this "./script.exp file.sql database username
password".
# If you have any characters that are interpreted by the shell wrap the
argument in single quotes.

/root/scripts/dumpOXexpectScrpt.exp /var/backups/openexchangedb.out \
$DEFAULT_SQL_DB $DEFAULT_SQL_USER $DEFAULT_SQL_PASS

elif [ "$1" = "--start" ]
then
        echo "we start things up again here"

/etc/init.d/cyrus21 start
/etc/init.d/postfix start
sleep 2s
/etc/init.d/openexchange start
/etc/init.d/postgresql start
/etc/init.d/tomcat4 start
echo `date`
echo " all done"

 fi


        Regards Geoff Scott
----------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.