The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED No systemctl?

Discussion in 'General Discussion' started by Paul Srch, Apr 6, 2017.

  1. Paul Srch

    Paul Srch Member

    Joined:
    Jul 4, 2012
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Cumming, Georgia, United States
    cPanel Access Level:
    Root Administrator
    Currently running cPanel on a CentOS 7 server. I'm getting the following message from my logrotate script:

    which I suspect is being caused by the following line in /etc/logrotate.d/cpanel:

    .

    I think I should be able to replace that line with one that reads
    (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?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The correct command to restart cpsrvd is:

    Code:
    /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.
     
  3. Paul Srch

    Paul Srch Member

    Joined:
    Jul 4, 2012
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Cumming, Georgia, United States
    cPanel Access Level:
    Root Administrator
    Thanks, that did the trick!
     
    cPanelMichael likes this.

Share This Page