my $keyfile ="";
my $api_base = "";
my $api_key = "";
-my $configfile;
+my $configfile = undef;
my $config = AppConfig->new( { CREATE => 1 } );
$config->define("api_url=s");
$config->define("api_keyfile=s");
+foreach (
+ "/usr/local/etc/hermes/hermes_config",
+ "/usr/local/etc/hermes/config",
+ "/etc/hermes/config",
+ $ENV{"HOME"} . "/.hermes/config",
+ $ENV{"HOME"} . "/.hermes_config",
+) { $configfile = $_ if ( -f $_ ); }
+
GetOptions(
"help" => \$help,
"host=s" => \$host_ip,