PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Gavin Aiken <gavin dot aiken at dtint dot co dot uk>
Subject: Re: how to shutdown server and continue shell script?
Date: Jul 6 2000 12:08PM

Try something like this:


echo "$PASSWORD\nshutdown\ngo\n" \
| $SYBASE/bin/isql -U sa -S $SERVER >/dev/null 2>&1 &


Gavin Aiken



>Hi,
>
>I am writing a bourne shell script which one of its subtask will be
>shutting down the sybase server.  I have tried different methods but the
>whole script stop after the server shuts down, giving me the usual
>"unexpected EOF from server...".  I tried trapping the signal but that
>doesn't stop my script from exiting either.  Is there any way to
>shutdown the server while continuing the script?  Below are some methods
>I have tried:
>
>1.  sql statement inside here document:
>
>...
>...
>## try trapping signal from server shutdown...
>trap '' 2 3 15
>
>/opt/sybase/bin/isql -Usa -S$SRV -P$SAPWD <shutdown with nowait
>go
>HEREDOC
>...
>...
>
>
>
>2.  using /etc/rc.d/init.d/functions' killproc
>
>...
>...
>killproc dataserver
>...
>...
>
>
>Thanks!
>
>Patrick
>


--------------------------------------------------------------------------
Gavin Aiken                               Chief Technical Engineer, Europe
Tel: +44-1277-246000                                  Fax: +44-1277-228767

Digital Technology International Ltd.
Brentwood House
169 Kings Road
Brentwood
Essex                                                Registered in England
CM14 4EG                                                       No. 1876409
--------------------------------------------------------------------------