Modding TUGm to use custom MAC on a VPS

Tugs Uptime Project is a great service for monitoring and recording the uptime of your various hosts.

They have various clients for (almost) all operating systems. Unfortunately all of their clients base the machine id by MD5-ing the machine MAC address. This works perfectly unless you are using a VPS… which will have no MAC address for its network interfaces, generating the same machine ID on every host.

So in an attempt to make their latest Linux client – TUPm – usable on my VPSs, I made some changes to the client and conf file to add support for defining my own custom MAC (when a MAC is not found).