Centos 7.2 /etc/rc.local replaced?
Hi
I was use on Centos 6.x this: Code:
nano /etc/rc.local Code:
rm -f /var/sphinx/*.spl Can you please help me with this as i do not know what to edit or how to fix it now ? :( Thank you |
Is the file executable?
Normally it would also have a "#!/usr/bin/bash" as the first line. I believe it is only used if it is executable. |
With systemd you need to enable the rc-local.service
Code:
systemctl enable rc-local.service |
yes it has on the first line the:
Code:
#!/bin/bash Do i have to use also this? Code:
systemctl enable rc-local.service |
yes (though you can drop the ".service" part.
You can test it without rebooting by "systemctl start rc-local" |
This is what i got :(
Code:
[root@server ~]# chmod +x /etc/rc.d/rc.local |
Try putting your rc.local file in /etc/rc.d/rc.local, make sure it's marked as executable.
I haven't used rc.local in a couple years, apparently you no longer need to enable the rc-local.service, it's now a static unit. |
I think you can ignore that (I get it too).
Service units that do have an install section also have a "WantedBy=..." entry. rc.local doesn't have any services that depend on it. |
All times are GMT -5. The time now is 08:53 PM. |