db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Wareham" <cware...@visitlondon.com>
Subject Re: Derby init script for Linux / Unix (SOLVED)
Date Tue, 09 Sep 2008 16:14:29 GMT
Still not sure if this is a manifestation of the ssh hang-on-exit bug,
but redirecting stderr to a file as well as stdout solves the problem.
It's probably a good idea not to overwrite that file when shutting down,
so with both changes the init script becomes:


# Starts and stops the derby database


derby_start () {
     su -l $DERBY_USER -c "$DERBY_HOME/bin/start_derby > 
$DERBY_HOME/logs/derby.log 2>&1 &"

derby_stop () {
     su -l $DERBY_USER -c "$DERBY_HOME/bin/stop_derby"

case "$1" in
     sleep 5
     echo "Usage: /etc/init.d/derby {start|stop|restart}"
     exit 1

exit 0
Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR
Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753

       Save the date for the Visit London Awards 2008! 
      Thursday 27th November, Royal Albert Hall.

'Visit London Limited' is registered in England under No.761149;
Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.

Visit London is the official visitor organisation for London. Visit London is partly funded
by Partnership, the Mayor's London Development Agency and London Councils.
The information contained in this e-mail is confidential and intended for the named recipient(s)
only.  If you have received it in error, please notify the sender immediately and then delete
the message.  If you are not the intended recipient, you must not use, disclose, copy or distribute
this email. The views expressed in this e-mail are those of the individual and not of Visit
London. We reserve the right to read and monitor any email or attachment entering or leaving
our systems without prior notice.
  Please don't print this e-mail unless you really need to.

View raw message