Commit eb419fa3 authored by Clément OUDOT's avatar Clément OUDOT

Improvements on CLI (#649)

parent ebd2240d
......@@ -39,9 +39,20 @@ $action = shift(@ARGV);
$method = $cli->determineMethod($action);
@ARGV ? $cli->run($method, @ARGV) : $cli->run($method);
# Display error if any
if ($cli->getError()) {
print $cli->getError()."\n";
exit 1;
}
# Save configuration if modified
if ( $cli->{confModified} ) {
$ret = $cli->saveConf();
print "Configuration $ret saved\n";
}
exit($ret);
exit 0;
__END__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment