LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-16-2011, 03:52 AM   #1
dreamervlk
LQ Newbie
 
Registered: Feb 2010
Posts: 7

Rep: Reputation: 0
Shell Script running in another shell script and then exit


Hi,

I have a shell script. And i want use last line script then exit, but when i run this script, its only waiting and then i must use ctrl+z keys. when i look ps -f CronClean.sh and /usr/local/etc/rc.d/proxy_monitor.sh start
running...

#CronClean.sh
ps -f | grep "proxy_monitor.sh" | awk '{print $1}' | xargs kill -9
/usr/local/etc/rc.d/squid.sh stop
rm -rf /var/squid/cache/
mkdir -p /var/squid/cache/
chown proxyroxy /var/squid/cache/
chmod 777 /var/squid/cache/
squid -z
/usr/local/etc/rc.d/squid.sh start
sh /usr/local/etc/rc.d/proxy_monitor.sh start


Volkan
 
Old 09-16-2011, 04:41 AM   #2
mirni
LQ Newbie
 
Registered: Nov 2008
Location: pacific
Distribution: CentOS, openSuse, Ubuntu
Posts: 12

Rep: Reputation: 0
Can you post the contents of /usr/local/etc/rc.d/proxy_monitor.sh? My guess would be that it hangs there...
 
Old 09-16-2011, 04:53 AM   #3
dreamervlk
LQ Newbie
 
Registered: Feb 2010
Posts: 7

Original Poster
Rep: Reputation: 0
http://code.google.com/p/pfsense-cac...nitor.sh?r=251

you can see on that link
 
Old 09-16-2011, 06:40 AM   #4
dreamervlk
LQ Newbie
 
Registered: Feb 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Ok i did it ...


i used to nohup command and it works

nohup sh /usr/local/etc/rc.d/proxy_monitor.sh start &
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
exit mail in shell script j-me Linux - General 1 02-15-2010 12:28 PM
shell script fails to exit twrig3846 Linux - Newbie 11 02-10-2010 12:10 AM
how to exit out of the calling Shell Script harimac Linux - Newbie 3 08-19-2009 01:49 AM
running a shell script which invokes another shell program!!! raghu123 Programming 1 08-04-2008 09:10 AM
Alias or shell script to confirm 'exit' commands from a shell rose_bud4201 Programming 2 03-08-2006 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration