summaryrefslogtreecommitdiff
path: root/gmi.pl
diff options
context:
space:
mode:
authorjake <jake@jakes-mail.top>2022-09-22 13:56:28 -0400
committerjake <jake@jakes-mail.top>2022-09-22 13:56:28 -0400
commit9aa5c9037d7e2dddc2ab46906bd34a23b0f7cd5b (patch)
tree6b2a0a871b542098670c5baaa7d9bb772f1dc72a /gmi.pl
parentc91dfeb17e33a56163c8970b6a86b313243f1025 (diff)
first argument is now the config file
Diffstat (limited to 'gmi.pl')
-rwxr-xr-xgmi.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/gmi.pl b/gmi.pl
index a7610a1..d3237c4 100755
--- a/gmi.pl
+++ b/gmi.pl
@@ -7,7 +7,7 @@ use warnings;
use 5.010;
#use diagnostics;
-our $VERSION = 'v0.18.3';
+our $VERSION = 'v0.19.0';
# Modules
use IO::Socket::SSL; # CPAN
@@ -70,8 +70,11 @@ const our @VALID_VHOST_SETTINGS =>
qw/auto_cert assume_index dir_listing root cert key default_mime bind ports
unix redirection redirect cert_req gone/;
-
-my ($config, $err) = from_toml(_slurp('./config.toml'));
+my $config_path = './config.toml';
+if ($ARGV[0]) {
+ $config_path = $ARGV[0];
+}
+my ($config, $err) = from_toml(_slurp($config_path));
if ($err) {
die "TOML config error: $err.";
}