In general, I like Textdrive hosting. The thing that has annoyed me greatly about it is that it forces you to use hideous browser-based "webmin" interface to do a lot of the configuration. For instance, to drop a database and recreate it requires over a dozen mouse clicks and a lot of waiting between clicks because it's always slow loading pages. That's just infuriating for a command line junkie like myself, especially when I have ssh access to the server but PostgreSQL's nice and simple createdb <dbname> command is not permitted by Textdrive.
It's not something I have to do every day, but on the occasion that it comes up it drives me crazy. So today I wrote some Net::HTTP ruby code that logs in and does all the necessary HTTP traffic to convince webmin into doing what should be a one line command anyhow. It wouldn't be hard to take this script and change it to do whatever webmin task you'd like to automate.
I used the Firefox plugin TamperData to grab the proper POSTDATA, and ran it with ruby-1.8.4 on OS X. Strangely, it didn't work on Textdrive's servers, bombing out with an error in the Net::HTTP code. Perhaps because the server is running ruby 1.8.5? I'll look into it later.









Comments