khalequzzaman17

Webuzo Apache Logs Cleanup

May 22nd, 2022 (edited)
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/bin/bash
  2. if [ -d "/usr/local/webuzo" ]; then
  3.     /usr/bin/find /usr/local/apps/apache/logs -type f -iname *.err* -delete &>/dev/null
  4.     /usr/bin/find /usr/local/apps/apache/logs -type f -iname *.gz -delete &>/dev/null
  5.     /usr/bin/find /usr/local/apps/apache/logs -type f -iname *.log* -delete &>/dev/null
  6.     /usr/bin/find /usr/local/apps/apache/logs -type f -iname *_log* -delete &>/dev/null
  7.     /usr/bin/find /usr/local/apps/apache/logs -type f -iname *error_log* -delete &>/dev/null
  8.     /usr/bin/find /usr/local/apps/apache/logs -type f -iname *php*_log* -delete &>/dev/null
  9.     echo "[+] Webuzo Apache Logs Cleaned [+]";
  10. fi
Add Comment
Please, Sign In to add comment