This lovely item came across my feed today and I realized there is so much that I do poorly when it comes to shell scripting it is absurd 🙁 https://dev.to/thiht/shell-scripts-matter Anyhow I am extremely thankful for this long and detailed post and wanted to pass it along to my readership. I also wanted to crowd-source […]

A lot of my bash scripting experience has been, in one sense, relatively simple. I have several scripts that span several hundred lines and do fairly complex things across multiple systems. From that perspective they aren’t necessarily simple. However it wasn’t until recently that I had to really starting thinking about managing when scripts run […]

I am working on a project where I need to generate a random value and assign it to a variable… Initially I was doing this: var=$(date +%s | sha512sum | base64 | head -c 12 ; echo) Which was okay until I started executing my script more than once in a short period of time. […]

If you run a custom theme for your Owncloud distribution, one of the things you know is that whenever you run an update of your Owncloud server it will automatically disable your theme as part of the update process. This is to keep things from blowing up in the event you have made a modification […]

I came across a real life-saver today… All of my backup scripts are based on using RSYNC. This is because I am used to working between linux systems on which I always have root/sudo access and also have SSH. However I was recently tasked with a “fun” project that involved me needing to script the […]

I wrote a new script today to keep me up-to-date on how full the boot partition is on my Ubuntu servers. I actually administer quite a few of them and it can become a real issue if the boot drive hits 100% full, which it commonly does. The reason for this is that the boot […]

This is the final article (I think…) on MySQL database backup. In my previous article I discussed how to craft a very efficient script for automated LOCAL backup of your MySQL databases. But that isn’t the whole story. What happens if your server burns to the ground… or more likely the hard drive gives up […]

Earlier this year I wrote an article about creating scripts for backing up your MySQL databases. A week ago I wrote another article about automated and secure root user login to your root MySQL database account. I have also been learning Python on and off and learning quite a bit about variables and loops. While […]

Do you work with MySQL? I do… quite a bit. Do you often script stuff on your server to make your life easier? I do that as well… quite a bit… Are you including your database user account and password (or worse… your mysql instance root user account and password!) in plain-text in your script… […]

I have setup a few servers with Ubuntu Server and one of the common security tools I use is Fail2Ban. One of the common requirements that comes with Fail2Ban is the need to provide other administrative personnel with a place they can quickly check which IP’s have been banned. Using a cool program called incron […]

As I am now hosting about 8 different sites I was wanting to make restoring from backups a bit easier and less manual. The ultimate goal is to login to my second server and have it up and running with as few key-strokes as possible. Scripting was the answer. It took me several hours of […]

If you aren’t familiar with Owncloud, it is a very cool open-source software package that runs on Linux Apache (or Nginx) that provides “dropbox like” functionality that you can host yourself. This is a big deal for the tech-savvy average-Joe that is worried about keeping private data private (i.e. he doesn’t want all of his […]