I made a BASH script to parse the autohaven.jnlp file. What never occurred to me was to actually download the autohaven file for you.
I now have a script that is a one stop shop for logging into Haven and Hearth. How to use the code I will post below.
1. Create a file in your Alternate client's folder named alternate.sh
2. Edit that file's permissions so it is executable for you (chmod 700 alternate.sh or any other combination you may prefer also you can edit through the properties of the file in the gui if that method tickles you more)
3. Edit alternate.sh with your username and password
4. Run alternate.sh
For future executions you will only need to run the alternate.sh file. It will remember all the values and create new connections to the server as necessary.
- Code: Select all
#!/bin/bash
export LD_LIBRARY_PATH=/usr/lib/jni/
USER=YOURUSERNAME
PASS=YOURPASSWORD
wget -O autohaven.wget http://www.havenandhearth.com/portal/sec/login --post-data "r=/portal/autohaven&username=$USER&password=$PASS"
AUTHCK=`grep "haven.authck" autohaven.wget | sed s/" <property name=\"haven\.authck\" value=\""// | sed s/"\" \/>"//`
rm -rf autohaven.wget
java -Xms384m -Xmx384m -Dhaven.authuser=$USER -Dhaven.authck=$AUTHCK -jar haven.jar moltke.seatribe.se -r ./res
rilaf