No systemctl?
Currently running cPanel on a CentOS 7 server. I'm getting the following message from my logrotate script:
/etc/cron.daily/logrotate:
Redirecting to /bin/systemctl restart cpanel.service
which I suspect is being caused by the following line in /etc/logrotate.d/cpanel: lastaction /etc/init.d/cpanel restart > /dev/null 2>&1
. I think I should be able to replace that line with one that reads lastaction /bin/systemctl restart cpanel.service > /dev/null 2>&1
(in other words, calling systemctl directly), however... if I try to run /bin/systemctl restart cpanel.service directly from the command line, I get "-bash: systemctl: command not found". That sounds odd; any ideas what's going on and how to correct it?
which I suspect is being caused by the following line in /etc/logrotate.d/cpanel: lastaction /etc/init.d/cpanel restart > /dev/null 2>&1
. I think I should be able to replace that line with one that reads lastaction /bin/systemctl restart cpanel.service > /dev/null 2>&1
(in other words, calling systemctl directly), however... if I try to run /bin/systemctl restart cpanel.service directly from the command line, I get "-bash: systemctl: command not found". That sounds odd; any ideas what's going on and how to correct it?
-
which I suspect is being caused by the following line in /etc/logrotate.d/cpanel:
Hello, The correct command to restart cpsrvd is:/scripts/restartsrv_cpsrvd
However, note the logrotate configuration file you referenced isn't provided by cPanel. I recommend removing that file, per the instructions on the following thread: logrotate failed to rename Thank you.0 -
Thanks, that did the trick! 0
Please sign in to leave a comment.
Comments
2 comments