|
|
|
|
@ -61,6 +61,7 @@ Mandatory arguments:
|
|
|
|
|
Options:
|
|
|
|
|
-h --help Print this help
|
|
|
|
|
-a <pid> --attachToProcess=<pid> Exit if given process id is not running anymore [default: 0]
|
|
|
|
|
--catalogOnly Serve only the library catalog
|
|
|
|
|
-d --daemon Detach the HTTP server daemon from the main process
|
|
|
|
|
-i <address> --address=<address> Listen only on the specified IP address. Specify 'ipv4', 'ipv6' or 'all' to listen on all IPv4, IPv6 or both types of addresses, respectively [default: all]
|
|
|
|
|
-M --monitorLibrary Monitor the XML library file and reload it automatically
|
|
|
|
|
@ -229,6 +230,7 @@ int main(int argc, char** argv)
|
|
|
|
|
std::string customIndexPath="";
|
|
|
|
|
std::string indexTemplateString="";
|
|
|
|
|
int serverPort = 80;
|
|
|
|
|
bool catalogOnlyFlag = false;
|
|
|
|
|
bool daemonFlag [[gnu::unused]] = false;
|
|
|
|
|
bool helpFlag = false;
|
|
|
|
|
bool noLibraryButtonFlag = false;
|
|
|
|
|
@ -256,6 +258,7 @@ int main(int argc, char** argv)
|
|
|
|
|
|
|
|
|
|
for (auto const& arg: args) {
|
|
|
|
|
FLAG("--help", helpFlag)
|
|
|
|
|
FLAG("--catalogOnly", catalogOnlyFlag)
|
|
|
|
|
FLAG("--daemon", daemonFlag)
|
|
|
|
|
FLAG("--verbose", isVerboseFlag)
|
|
|
|
|
FLAG("--nosearchbar", noSearchBarFlag)
|
|
|
|
|
@ -379,6 +382,7 @@ int main(int argc, char** argv)
|
|
|
|
|
server.setIpConnectionLimit(ipConnectionLimit);
|
|
|
|
|
server.setMultiZimSearchLimit(searchLimit);
|
|
|
|
|
server.setIpMode(ipMode);
|
|
|
|
|
server.setCatalogOnlyMode(catalogOnlyFlag);
|
|
|
|
|
|
|
|
|
|
if (! server.start()) {
|
|
|
|
|
exit(1);
|
|
|
|
|
|