add config object, connect user system up to lists code
[scpubgit/App-EzPz.git] / bin / ezpz-admin-repl
index 22850c6..c26e8ac 100755 (executable)
@@ -5,8 +5,8 @@ use File::Which;
 use App::EzPz::UserStore;
 use strictures 1;
 
-die "Usage: ezpz-admin-repl ezmlm-bindir htpasswd-file"
-  unless @ARGV == 2;
+die "Usage: ezpz-admin-repl htpasswd-file [ezmlm-bindir list-base-dir]"
+  unless @ARGV == 1 or @ARGV == 3;
 
 {
   package Eval::WithLexicals::Scratchpad;
@@ -14,8 +14,13 @@ die "Usage: ezpz-admin-repl ezmlm-bindir htpasswd-file"
   use vars qw($users);
 
   $users = App::EzPz::UserStore->new(
-    ezmlm_bindir => $ARGV[0],
-    htpasswd_file => $ARGV[1],
+    htpasswd_file => $ARGV[0],
+    (@ARGV > 1)
+      ? (ezmlm_config => {
+           bindir => $ARGV[1],
+           list_base_dir => $ARGV[2],
+        })
+      : ()
   );
 }