|
|
|
|
@ -62,6 +62,7 @@ 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
|
|
|
|
|
--contentServerURL=<url> Root URL of the server serving ZIM content for this library
|
|
|
|
|
-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
|
|
|
|
|
@ -231,6 +232,7 @@ int main(int argc, char** argv)
|
|
|
|
|
std::string indexTemplateString="";
|
|
|
|
|
int serverPort = 80;
|
|
|
|
|
bool catalogOnlyFlag = false;
|
|
|
|
|
std::string contentServerURL;
|
|
|
|
|
bool daemonFlag [[gnu::unused]] = false;
|
|
|
|
|
bool helpFlag = false;
|
|
|
|
|
bool noLibraryButtonFlag = false;
|
|
|
|
|
@ -259,6 +261,7 @@ int main(int argc, char** argv)
|
|
|
|
|
for (auto const& arg: args) {
|
|
|
|
|
FLAG("--help", helpFlag)
|
|
|
|
|
FLAG("--catalogOnly", catalogOnlyFlag)
|
|
|
|
|
STRING("--contentServerURL", contentServerURL)
|
|
|
|
|
FLAG("--daemon", daemonFlag)
|
|
|
|
|
FLAG("--verbose", isVerboseFlag)
|
|
|
|
|
FLAG("--nosearchbar", noSearchBarFlag)
|
|
|
|
|
@ -383,6 +386,7 @@ int main(int argc, char** argv)
|
|
|
|
|
server.setMultiZimSearchLimit(searchLimit);
|
|
|
|
|
server.setIpMode(ipMode);
|
|
|
|
|
server.setCatalogOnlyMode(catalogOnlyFlag);
|
|
|
|
|
server.setContentServerUrl(contentServerURL);
|
|
|
|
|
|
|
|
|
|
if (! server.start()) {
|
|
|
|
|
exit(1);
|
|
|
|
|
|