Dump all databases

Simple script with minimal settings to be set. Will dump databases and save them in a location of your choosing after cleaning backups that are deemed to old (age of your choosing). It’s been written with mariadb as primary target. Mariadb binaries complain now when called on with their mysql-counterpart names. So mysql is now …
Continue reading Dump all databases

Identify php versions per domain per user in directadmin

At times you might want to get a list of which php versions are in use by which domain. There’s a plugin for directadmin for that (https://wavoe.bitbucket.io/phpversionlist/phpversionlist.tar.gz) but you can’t easily export the info to excel, especially when doing multiple servers. This script makes a nice csv. Changelog:v2.2: 2022/02/11: added creator If you have multiple …
Continue reading Identify php versions per domain per user in directadmin

directadmin’s dnssec made easier

Directadmin offers support for DNSSEC. In order to config this you have to edit the zone file, twice. You first to to dns management, search for the domain and click the generate keys button. Then you have to go back and clik the sign button. You can use the script /usr/local/directadmin/scripts/dnssec.sh but you have to …
Continue reading directadmin’s dnssec made easier

A simple watchdog script

At times you find some daemons just stop but since they’re not actively used all the time etc you don’t find out until long after. This script watches the named process. Run it from cron to run checks occasionally (like */15 * * * * for every 15 minutes). If you replace the DAEMON=<daemon name> …
Continue reading A simple watchdog script

repair and optimize all tables

Sometimes the database daemon crashes (because the server ran out of swap space for example). This can cause the databases to be damaged. Finding and repairing the database table in question can be an arduous task, especially if you have a lot of databases. This script runs both repair and optimize on all tables. You’ll …
Continue reading repair and optimize all tables

Automatically block asshole bots

There’s a great many bots out there that set off so many requests webservers can get swamped. This script searches for particular user agents, finds the originating ip address (ipv4 or ipv6) and then blocks the whole subnet. This is specifically done for yandex and MJ12bot who use a large amount of subnets. This script …
Continue reading Automatically block asshole bots