Re: /etc/init.d CentOS 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Jerry Geis wrote:
>>is your init.d script chmod +x ?
>
>>just putting something in init.d isn't sufficient, it has to be linked
>>in rc?.d  as a S##name  ... which chkconfig on (or systemctl) are
>>supposed to do
>
> Yes the script is executable... forgot to mention that.
>
> From the comment in the README file, I thought that was all I needed to
> do.
>
> I have not run any chkconfig or systemctl.

That's the problem, then. It should have comments, near the top, as to
what what runlevel it should be started at, and *when* (i.e., after the
network is up for apache...). Then running chkconfig <servicename> on will
make it happen.

>From a 6.5 server, from /etc/init.d/sshd:

# chkconfig: 2345 55 25

This will start and make sure sshd is running in runlevels 2, 3, 4, and 5,
and it will start it as S55sshd on the way up, and shut id down with K25
on the reboot.

      mark

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux