HCoop
/
hcoop
/
domtool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dfd1906
)
domtool-config: print errors on stderr, return failure code, export vmaildb
author
Clinton Ebadi
<clinton@unknownlamer.org>
Tue, 6 May 2014 23:20:29 +0000
(19:20 -0400)
committer
Clinton Ebadi
<clinton@unknownlamer.org>
Tue, 6 May 2014 23:20:29 +0000
(19:20 -0400)
src/main-config.sml
patch
|
blob
|
blame
|
history
diff --git
a/src/main-config.sml
b/src/main-config.sml
index
8aacdb0
..
a3fc686
100644
(file)
--- a/
src/main-config.sml
+++ b/
src/main-config.sml
@@
-27,6
+27,8
@@
*)
fun println x = (print x; print "\n")
*)
fun println x = (print x; print "\n")
+fun printerr x = (TextIO.output (TextIO.stdErr, x); TextIO.flushOut TextIO.stdErr)
+fun die reason = (printerr reason; printerr "\n"; OS.Process.exit OS.Process.failure)
val _ =
(case CommandLine.arguments () of
val _ =
(case CommandLine.arguments () of
@@
-39,9
+41,10
@@
val _ =
| "certs" => println Config.certDir
| "keys" => println Config.keyDir
| "truststore" => println Config.trustStore
| "certs" => println Config.certDir
| "keys" => println Config.keyDir
| "truststore" => println Config.trustStore
- | _ => println "Invalid cert path type")
- | _ => print "Invalid path type\n")
+ | _ => die "Invalid cert path type")
+ | ["vmaildb"] => println Config.Vmail.userDatabase
+ | _ => die "Invalid path type")
| ["-nodes"] => (app (fn (n, _) => (print n; print " ")) Config.nodeIps;
print "\n")
| ["-domain"] => println Config.defaultDomain
| ["-nodes"] => (app (fn (n, _) => (print n; print " ")) Config.nodeIps;
print "\n")
| ["-domain"] => println Config.defaultDomain
- | _ =>
print "Invalid command-line arguments\n
")
+ | _ =>
die "Invalid command-line arguments
")