Skip to content

Instantly share code, notes, and snippets.

@basitengr
basitengr / fail2ban-reset-log-db.sh
Created February 6, 2018 20:52 — forked from mitchellkrogza/fail2ban-reset-log-db.sh
Bash script to reset Fail2Ban - clears / truncates log file and deletes the sqlite database - stops and restarts service during this process.
#!/bin/bash
# Bash Script by https://gist.github.com/mitchellkrogza
# ************************************************************
# This script clears the log file and database of Fail2Ban
# This resets Fail2Ban to a completely clean state
# Useful to use after you have finished testing all your jails
# and completed your initial setup of Fail2Ban and are now
# putting the server into LIVE mode
# ************************************************************
@basitengr
basitengr / astpp-log-cleanup.sh
Created February 6, 2018 20:51 — forked from dedayoa/astpp-log-cleanup.sh
Bash script to help clean up all filled logs on ASTPP
#!/bin/bash
# This bash script help release astpp from overfull logs To view the top 10 biggest directories cloggin up the HDD, run sudo du
# --block-size=M -a / | sort -n -r | head -n 10 empty astpp.logs
echo "Emptying astpp logs"
cd /var/log/astpp/
> astpp.log
# empty freeswitch logs
echo "Emptying freeswitch logs"
cd /usr/local/freeswitch/log/