Here's the script I ended up with. Of course, I could improve on it, but, you'll get the point.
Code: Select all
#!/bin/sh
rm /tmp/login.php* /tmp/index.php* /tmp/moduleinterface.php*
sitename='http://www.mysite.com'
cookies=/tmp/cookies.tmp
postdata='username=theusername&password=thepassword&loginsubmit=Submit'
cd /tmp
wget --save-cookies ${cookies} --keep-session-cookies --post-data=$postdata ${sitename}/admin/login.php
wget --load-cookies ${cookies} ${sitename}/admin/moduleinterface.php\?mact=FileMailer,m1_,admin_setfiles,0
rm /tmp/cookies.tmp