This is a general, share with the community post. There are a bunch of things I do whenever I set up a new Hestia server. Some pretty generic, and personal like fixing .bashrc to my satisfaction. But there are a bunch of others, so I thought I’d share them here, and see if anyone wanted to add to the list.
OK, so this one for a start … I generally set up a script called weekly_maintenance.sh and run it via root’s cron. Currently it looks like this
#!/bin/bash # See if there's an update for wp-cli /usr/local/bin/wp-cli cli update --allow-root --yes # Clean systemlog /bin/journalctl --vacuum-size=500M > /dev/null # Remove tmp session files over one day old find /home/*/tmp -type f -name 'sess_*' -mtime +1 -delete # Clean fail2ban db /usr/bin/sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 "delete from bans where timeofban <= strftime('%s', date('now', '-90 days'));" /usr/bin/sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 "vacuum;"
If you haven’t checked out the size of your fail2ban and system log databases, its worth doing. I’ve found gigabytes of wasted space in there …