cron.daily question

  • I have a question and hope that someone can't point me the right direction. Everyday I get an email telling me this:


    /etc/cron.daily/logrotate:
    invoke-rc.d: action rotate is unknown, but proceeding anyway.


    Where do i look to fix this. and/or keep it from notifying me everyday about it. I do want leave my notifications on, just don't want to see this everyday in my inbox It's more of an annoyance than anything but if I can fix the problem i'd like to.

  • Just came across the same problem.
    Found a simple solution here: link


    Ok. If you get the problem again, just do: rm /usr/sbin/policy-rc.dThis file that is created by i-MSCP is normally deleted automatically after packages installation/update.


    Removing /usr/sbin/policy-rc.d (which was an empty file here) made the error messages go away and I haven't noticed any other problem related to removing this file... so far!


    BUT BE WARNED! Use at your own risk!
    I just wanted to let you know what I found out by searching on the internet and I will not take any responsibility to anything going wrong on your system!


    Here are a few more links related to /usr/sbin/policy-rc.d:

  • actually what I ended up doing was deleting that directory entirely. Weather that will cause a major issue or not, i'm not sure. so i did an rm -f /etc/cron.daily/logrotate and the problem was gone. hopefully it doesn't mess up any major alerts, like if a drive is failing or something.

  • Well, /etc/cron.daily/logrotate shouldn't be a directory...
    Every file in /etc/cron.daily/ will be executed once a day (well, as it says: daily ;) ).
    So, removing /etc/cron.daily/logrotate simply removes the execution of logrotate from your daily cron.
    So - as far as I understand - you basically disabled the log rotation which shouldn't mess anything up, but without rotation log files will become much bigger gradually and therefore the system might start to slow down.

  • Haha, I guess I should probably fix that then huh? Didn't realize that's what it was doing. Just got tired of it sending me an email saying it know what to do. I actually just upgraded the system to 3. Would it have corrected the issue when the new files were installed? Otherwise how would one go about fixing what I deleted? 8|

  • Well, if there is no new logrotate file in /etc/cron.daily after the update/upgrade you could simply create a new file.
    On my system it looks like this (no changes made there):


    Bash
    #!/bin/sh
    
    
    test -x /usr/sbin/logrotate || exit 0
    /usr/sbin/logrotate /etc/logrotate.conf

    Owner and permission are all the same for all files in /etc/cron.daily (with ".placeholder" as a exception):


    -rwxr-xr-x 1 root root 89 Nov 8 2014 logrotate


    Hope that helps ;).

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!