Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Call Script that Deletes Logs after Stats Run Manually?

Discussion in 'General Discussion' started by thewird, Jan 12, 2008.

  1. thewird

    thewird Well-Known Member

    Jan 4, 2006
    Likes Received:
    Trophy Points:
    I'm trying to create a script to archive logs for 7 days but still deleted them from the domlogs daily. Has someone already done this? The idea solution would be to modify the CPanel script that deletes them after stats run but I'm not sure if thats protected code by CPanel. The other option would be to disable the delete logs after stats run option and to create a script to copy the logs somewhere else via cron and call the script that CPanel uses to delete the logs without restarting apache. This script would also move the files through directories and eventually delete them, therefore preserving the logs for 7 days. Any ideas?


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice