Man, I’ve been busy… I’ve recently been promoted to being a System’s Administrator! This has forced me to program a few BASH scripts. This one is for a customer that wants a managed system, but wants to be able to add websites at will. It’s pretty simple, and relies on an existing example.com template. Why example.com? Because I follow RFCs dammit! The template allows me to adjust the Apache specific settings, without recoding the script. A little REGEX here, and a pipe to sed there, some error checking, formatting and a dash of some SUDO magic and voila! The customer doesn’t need to email/call me to add a website. Sure beats paying for a crappy control panel
This is a live and learn moment. When I did my last update, I had a lot of old libraries hanging around. I thought that portupgrade would recompile all of my ports, but it didn’t. Most had been recompiled in the interim as I had been upgrading, but Apache, well, Apache upgrades are hardly for the weak. So, when I deleted a bunch of crud laying around. I broke SUEXEC. SUEXEC is what allows scripts to be executed under my various users’ home directories. Well, a recompile and reinstall, and things are working much much faster. Always fix your architecture kids.
I’ve decided to get my learn on, so I’m going through Juniper and Cisco training material. It’s fun, actually. Juniper certs are free, for now, so I’m starting there. Most of their material seems to compare JunOS to IOS anyways so it’s a two for one. Now to get a lab going…