0

Now my script is able to start server, But I am still have some problem with my script.

When the start server command is executed, the control does not pass the line and does not execute further of that line.

Please tell me what is the problem and how can I get smooth execution of the my script.

My Script:

SUBIT="su - adminuser -c "
SERVER_BOX_COMMAND_A="Server"

##############
# Function to start cluster

function start(){

   $SUBIT "$SERVER_BOX_COMMAND_A"

   doFurther 
}

doFurther (){
    #tasks after server is started
}

case "$1" in
start)
    start
   ;;
stop)
   stop
  ;;
restart)
   $0 stop
   $0 start
   ;;
*)
   echo "usage: $0 (start|stop|restart)"
   ;;
esac
2
  • We're going to need to see the script to help you :)
    – user1931
    Commented Apr 1, 2010 at 5:49
  • Updated my question and added shell script.
    – vijay.shad
    Commented Apr 1, 2010 at 6:03

1 Answer 1

1

works as designed? "su adminuser ..." is running and will call doFurther when finished. May be you wanted to put $SERVER_BOX_COMMAND_A in the background? Just add an ampersand, so that the final command looks like: su adminuser -c "..... &".

I hope this helps, Klaus

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .