LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 12-30-2008, 01:52 AM   #1
shoaibahmedkhan
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Rep: Reputation: 0
re-execute rc.local file only


Hi,
I am using RHEL 5 and i have configured a daemon that starts automatically when system boots, i have written its startup script on /etc/rc.d/rc.local file and it executes successfully but the problem is that if that daemon stops running (due to any reason) i have to restart/reboot the whole server so that the daemon runs, i need to know that is there a way that we can just re-executes the /etc/rc.d/rc.local file while the whole sytem remains as it is.
 
Old 12-30-2008, 02:03 AM   #2
SqdnGuns
Member
 
Registered: Aug 2005
Location: Fountain Valley, CA / Thailand
Distribution: Slackware64 14.0
Posts: 981

Rep: Reputation: 88
No need to post the same question in multiple categories.

Sorry, don't have an answer.......
 
Old 12-30-2008, 02:17 AM   #3
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
have you tried

# /etc/rc.d/rc.local

as root? rc.local is just a script like any other script.

It would probably be better to write a proper startup script, and use

chkconfig --add

to add the service, then simply "service whatever start". Try using one of the scripts in /etc/rc.d/init.d as a starting point

Last edited by billymayday; 12-30-2008 at 02:23 AM.
 
Old 12-30-2008, 02:44 AM   #4
shoaibahmedkhan
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday View Post
have you tried

# /etc/rc.d/rc.local

as root? rc.local is just a script like any other script.

It would probably be better to write a proper startup script, and use

chkconfig --add

to add the service, then simply "service whatever start". Try using one of the scripts in /etc/rc.d/init.d as a starting point
actually i want to execute it before logging in as any user/root
 
Old 12-30-2008, 02:55 AM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Then you need to write a script to check if it's still running
 
  


Reply

Tags
autostart, rclocal, reboot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
execute rc.local without reboot of linux server tooparam Slackware 31 07-26-2012 12:02 AM
how to execute a script file? Have file/directory not found error sirius57 Linux - Software 2 11-22-2007 12:43 AM
bash: /usr/local/bin/CMIX: cannot execute binary file orenmagid Linux - Software 1 07-18-2007 04:16 PM
Without rc.local how I execute commands on boot dyool Ubuntu 2 09-30-2006 02:47 PM
rc.local won't execute on Suse 10.0 advwebsys Suse/Novell 5 01-26-2006 06:45 PM


All times are GMT -5. The time now is 10:59 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration