summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorMichael Larson <slioch@eng-140.vyatta.com>2008-02-01 14:32:25 -0800
committerMichael Larson <slioch@eng-140.vyatta.com>2008-02-01 14:32:25 -0800
commit181b7cc450cc2ad1865d5275a7a2a6b59baf01d2 (patch)
tree784c7c341ca63736f6fad983c2f7eacf92e10f64 /src/main.cc
parente150f133e0b982acf67310e926bf10c143838f39 (diff)
downloadvyatta-wanloadbalance-181b7cc450cc2ad1865d5275a7a2a6b59baf01d2.tar.gz
vyatta-wanloadbalance-181b7cc450cc2ad1865d5275a7a2a6b59baf01d2.zip
init script fix. set up show commands. create output file for wan lb status and provide show status cmd.
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.cc b/src/main.cc
index e62c6c5..362280c 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -44,6 +44,7 @@ static void usage()
cout << "-t load configuration file only and exit" << endl;
cout << "-v print debug output" << endl;
cout << "-i specify location of pid directory" << endl;
+ cout << "-o specify location of output directory" << endl;
cout << "-d run as daemon" << endl;
cout << "-h help" << endl;
@@ -73,11 +74,12 @@ int main(int argc, char* argv[])
int ch;
bool debug = false;
bool config_debug_mode = false, daemon = false;
- string pid_path;
+ string pid_path = "/var/run";
+ string output_path = "/var/load-balance";
string c_file;
//grab inputs
- while ((ch = getopt(argc, argv, "f:hti:dv")) != -1) {
+ while ((ch = getopt(argc, argv, "f:hti:o:dv")) != -1) {
switch (ch) {
case 'f':
c_file = optarg;
@@ -91,6 +93,9 @@ int main(int argc, char* argv[])
case 'i':
pid_path = optarg;
break;
+ case 'o':
+ output_path = optarg;
+ break;
case 'd':
daemon = true;
break;
@@ -120,7 +125,7 @@ int main(int argc, char* argv[])
pid_output(pid_path.c_str());
}
- g_lb = new LoadBalance(debug);
+ g_lb = new LoadBalance(debug, output_path);
bool success = g_lb->set_conf(c_file);
if (success == false) {