WordPress Developer & Linux Administrator


Bash script to fix permissions on a cPanel web server

Colin at ServInt created it. Boom Shadow modified it. Now I’ve enhanced it to do more.

This version is exactly the same as Boom Shadow’s version, however, I’ve modified it to support additional /home directories so that permissions extend beyond just the default /home directory.

Continue Reading

How to determine if bash script is running from within the script

Often times when running a bash script, you don’t want it to be executed on a cron (again) if it’s already running. This little trick will show you how to code a contingency into your script so that it doesn’t doubly or triply execute while the first script instance is running.

Typically this involves using a temp or lock file, so that you can easily track the status of the script. I’m going to show you two examples.

Continue Reading