Centos 6.6 /etc/init.d/rc.local doesn't run the command after restart
Hi
I am using shinx and i have on instructions to execute a command after server restart from rc.local so i do this: Code:
nano /etc/init.d/rc.local end i add the command there save and exit: Code:
/usr/local/bin/searchd --config /sphinxconfig/sphinx.conf Then i run it manualy from ssh and all are fine .... Any ideas why? Thanks |
have you made /etc/init.d/rc.local executable?
|
no should i ? and how?
I thought that should be already made by the system..... |
You add the commands to be run in the /etc/rc.local file. The init.d script executes that file.
|
So why is not running and what can i do for it?
|
In a nutshell scripts are actually run from the /etc/rcx.d directory where x is the run level. If you look in rc5.d you will see that S99local is a link to the /etc/rc.local. Add the desired commands to the /etc/rc.local.
|
So can i just add my command to /etc/rc.local and it will run after restart ?
|
Yes
|
Thanks !!!
|
Quote:
I am having the same issue. I'm going to rebuild my vps with centos 7.0 and lean "systemd" |
Domination,
CentOS 6 does not have an /etc/init.d/rc.local. Different distributions / versions have different methods for running a rc.local script. Actually sphinx is in the CentOS repositories so if installed via yum it should be a service so no need for rc.local. Just set the service to start at boot. Your issue may or may not be similar but without any details we can not help. |
All times are GMT -5. The time now is 04:31 PM. |