how to install initctl on a centos-7 box

5k Views Asked by At
service autofs restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service autofs restart
/etc/init.d/autofs: line 54: initctl: command not found

I have looked up on the web and do not see any yum package that can install initctl. can you please help.

1

There are 1 best solutions below

0
On

CentOS 7 comes with systemctl to manage service. You don't need to use initctl.

service autofs restart should point to systemctl restart autofs

You can check the status of this service with systemctl status autofs and post us the output if not able to restart.