Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Linux
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 2-Oct-12 22:51pm
(unknown member)
Comments
Richard MacCutchan at 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.
Pranit Kothari at 3-Oct-12 5:15am
   
Combine command also working on terminal..
Richard MacCutchan at 3-Oct-12 5:27am
   
In that case I have no idea, you will need to do some debugging.
Pranit Kothari at 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)

  Print Answers RSS
0 OriginalGriff 525
1 Maciej Los 319
2 BillWoodruff 174
3 Suraj Sahoo | Coding Passion 170
4 /\jmot 152
0 OriginalGriff 8,654
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,229
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100