mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Cleaning /hdd/home
This commit is contained in:
parent
935c7b2d08
commit
71daf552e5
1 changed files with 17 additions and 9 deletions
|
@ -24,15 +24,23 @@ find /usr/local/vesta/log/ -type f -name "*.log" -exec truncate -s 0 {} \;
|
|||
find /usr/local/vesta/log/ -type f -not -name "*.log" -delete
|
||||
find /var/log/exim4/ -type f -exec truncate -s 0 {} \;
|
||||
|
||||
find /home/*/web/*/public_html/wp-content/aiowps_backups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find /home/*/web/*/public_html/wp-content/envato-backups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find /home/*/web/*/public_html/wp-content/ai1wm-backups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find /home/*/web/*/public_html/wp-content/wpvividbackups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find /home/*/web/*/public_html/wp-content/updraft/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find /home/*/web/*/public_html/ -type f -name "*.wpress" -delete
|
||||
find /home/*/web/*/public_html/ -type f -name "error_log" -exec truncate -s 0 {} \;
|
||||
find /home/*/web/*/public_html/ -type f -name "error_log.txt" -exec truncate -s 0 {} \;
|
||||
find /home/ -type f -name "*.log" -exec truncate -s 0 {} \;
|
||||
clean_home() {
|
||||
find $1/*/web/*/public_html/wp-content/aiowps_backups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find $1/*/web/*/public_html/wp-content/envato-backups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find $1/*/web/*/public_html/wp-content/ai1wm-backups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find $1/*/web/*/public_html/wp-content/wpvividbackups/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find $1/*/web/*/public_html/wp-content/updraft/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find $1/*/web/*/public_html/wp-content/ezpz-one-click-backup/ -type f -not -name ".htaccess" -not -name "index.php" -not -name "index.html" -not -name "web.config" -delete
|
||||
find $1/*/web/*/public_html/ -type f -name "*.wpress" -delete
|
||||
find $1/*/web/*/public_html/ -type f -name "error_log" -exec truncate -s 0 {} \;
|
||||
find $1/*/web/*/public_html/ -type f -name "error_log.txt" -exec truncate -s 0 {} \;
|
||||
find $1/ -type f -name "*.log" -exec truncate -s 0 {} \;
|
||||
}
|
||||
|
||||
clean_home "/home"
|
||||
if [ -d "/hdd/home" ]; then
|
||||
clean_home "/hdd/home"
|
||||
fi
|
||||
|
||||
fail2ban_running=$(/usr/local/vesta/bin/v-list-sys-services | grep 'fail2ban' | grep -c 'running')
|
||||
if [ $fail2ban_running -eq 1 ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue