Click here to Skip to main content
15,894,539 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I run script to restart mongrel written in .sh file , It is not working properly.

Below are the commands written in .sh file.

cd /home/apps/stage/bd/log && rm mongrel.pid -f pkill -9 mongrel_rails -u bandega cd /home/apps/stage/bd && mongrel_rails start -e production -p 4184 -d

But when I manually run all above commands one by one on terminal, It is working properly and server is started properly.

Is there are some problems while running script in .sh file?

Thanks in advance.
Posted
Comments
Richard MacCutchan 3-Oct-12 4:24am    
Split the commands into single commands as you do manually and see what happens. Make sure you capture all output when testing.
[no name] 3-Oct-12 5:15am    
Combine command also working on terminal..
Richard MacCutchan 3-Oct-12 5:27am    
In that case I have no idea, you will need to do some debugging.
[no name] 3-Oct-12 5:40am    
Ok. Thanks for your help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900