summaryrefslogtreecommitdiff
path: root/tools/ltgrey.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-31 15:00:19 -0700
committerJohn Denker <jsd@av8n.com>2012-07-31 17:48:52 -0700
commit4ed0a7a5212d83029d52ef4104b13cb48e9dd41f (patch)
treeecc73855dffa21c1fb511c88c70365e2d8c8f9d3 /tools/ltgrey.c
parentefb6301f794cc272173fa09ad83293ad3aa79ad4 (diff)
ltgrey will attempt to create its working directories
Diffstat (limited to 'tools/ltgrey.c')
-rw-r--r--tools/ltgrey.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/ltgrey.c b/tools/ltgrey.c
index bc41a99..ee6b4e5 100644
--- a/tools/ltgrey.c
+++ b/tools/ltgrey.c
@@ -18,6 +18,17 @@ int main(int _argc, char** _argv){
char** argv(_argv);
const string parent_dir("/var/qmail/ltgrey");
whatsit foo(argv[0], parent_dir); argc--; argv++;
+
+ if (foo.setup()) return ex_syserr;
+
+ int rslt;
+ rslt = foo.maybe_mkdir(".", "parent dir");
+ if (rslt) return rslt;
+ rslt = foo.maybe_mkdir(box_40.dir, "quarantine dir");
+ if (rslt) return rslt;
+ rslt = foo.maybe_mkdir(box_rep.dir, "reputation dir");
+ if (rslt) return rslt;
+
int scan40mode(0);
int scanrepmode(0);
int copies(1);
@@ -89,7 +100,6 @@ int main(int _argc, char** _argv){
exeunt(ex_syserr);
}
}
- if (foo.setup()) return ex_syserr;
// dns_mode mode ...
// Probably it would be better to make more thorough DNS checks.