Implemented ability to use multiple config files with one install
Implemented ability to use multiple config files with one install

file:a/README -> file:b/README
--- a/README
+++ b/README
@@ -70,7 +70,18 @@
 
 The most appropriate run interval will differ by each users situation, but common sense should be applied. There's not a huge amount of point in attempting to mask your traffic if the script doing the masking runs once every 12 hours for 5 minutes a time.
 
-There may also be situations where it's better to run the script in a while loop than to add it to crontab.
+There may also be situations where it's better to run the script in a while loop than to add it to crontab.  
+
+
+
+Client - Multiple Config Files
+----------------------------------
+
+Although the default config file is called 'config' you can pass the filename of an alternative config file if you wish to maintain multiple configurations
+
+	./request_generator -c foo.config
+
+The filename passed can either be an absolute path, or the name of a config file in the same directory as the request_generator script.
 
 
 ---------------------------------------

--- a/client-side/request_generator.sh
+++ b/client-side/request_generator.sh
@@ -5,9 +5,32 @@
 
 mydir=`dirname $0`
 
+
+while getopts "c:" flag
+do
+
+        case "$flag" in
+                c) configfile="$OPTARG";;
+        esac
+done
+
+
+configfile=${configfile:-"$mydir/config"}
+
+
+if [[ ! -f "$configfile" ]]
+then
+	if [[ ! -f "$mydir/$configfile" ]]
+	then
+		echo "Config file ($configfile) not found"
+		exit
+	fi
+	configfile="$mydir/$configfile"
+fi
+
+
 # Load the config
-
-source "$mydir/config"
+source "$configfile"
 
 
 [[ -f "$LOCKFILE" ]] && exit;