The Pigbox Connection

Date: 2008-11-02 11:52:02 Created: null

Create a nice little script on Pigbox that updates a nice little page in this site informing people if Pigbox is up or not, and give links to Pigbox if it is indeed available. Uplodaing a really small textfile by FTP that is included in all other pages might be easiest. Just need to remember to set it back when Pigbox goes offline as well ... The textfile only needs to set a variable to true or false, maybe store IP as well, then pages that want to link can just check for status.

A script checking on the server would work too, I guess. But that's not as flexible, no fun if Pigbox should change IP or something ...

So, Pigbox would need to find out its own IP (for highest flexibility we can't assume we're behind bjoreman.dyndns.org) and then upload a little file, overwriting the existing one. When going down, it needs to update the file again, unless it updates periodically and we have a script on the server that changes the status to offline if the file hasn't been updated in a while.