[Libreoffice-commits] online.git: loolwsd/configure.ac loolwsd/LOOLWSD.cpp loolwsd/LOOLWSD.hpp loolwsd/loolwsd.xml
Andras Timar
andras.timar at collabora.com
Thu Mar 24 09:38:05 UTC 2016
loolwsd/LOOLWSD.cpp | 7 ++++++-
loolwsd/LOOLWSD.hpp | 1 +
loolwsd/configure.ac | 6 ++++++
loolwsd/loolwsd.xml | 4 ++--
4 files changed, 15 insertions(+), 3 deletions(-)
New commits:
commit f9cc0237b3233c460c5b3ce184272d6d3350f53e
Author: Andras Timar <andras.timar at collabora.com>
Date: Thu Mar 24 10:37:17 2016 +0100
loolwsd: put config file and cert/key files to /etc
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index a8a3996..d299c38 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1011,6 +1011,7 @@ private:
std::atomic<unsigned> LOOLWSD::NextSessionId;
int LOOLWSD::BrokerWritePipe = -1;
std::string LOOLWSD::Cache = LOOLWSD_CACHEDIR;
+std::string LOOLWSD::Config = LOOLWSD_CONFIGDIR;
std::string LOOLWSD::SysTemplate;
std::string LOOLWSD::LoTemplate;
std::string LOOLWSD::ChildRoot;
@@ -1037,7 +1038,11 @@ LOOLWSD::~LOOLWSD()
void LOOLWSD::initialize(Application& self)
{
// load default configuration files, if present
- loadConfiguration();
+ if (loadConfiguration() == 0)
+ {
+ std::string configPath = LOOLWSD::Config + "/loolwsd.xml";
+ loadConfiguration(configPath);
+ }
ServerApplication::initialize(self);
}
diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index f2a498e..92a3682 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -40,6 +40,7 @@ public:
static int BrokerWritePipe;
static bool DoTest;
static std::string Cache;
+ static std::string Config;
static std::string SysTemplate;
static std::string LoTemplate;
static std::string ChildRoot;
diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac
index f4993e9..1066ff6 100644
--- a/loolwsd/configure.ac
+++ b/loolwsd/configure.ac
@@ -164,6 +164,12 @@ done
AC_DEFINE_UNQUOTED([LOOLWSD_CACHEDIR],["$LOOLWSD_CACHEDIR"],[Cache folder])
AC_SUBST(LOOLWSD_CACHEDIR)
+# FIXME
+# LOOLWSD_CONFIGDIR=${sysconfdir}/${PACKAGE} -> #define LOOLWSD_CONFIGDIR "${prefix}/etc/loolwsd" in config.h ???
+LOOLWSD_CONFIGDIR=/etc/${PACKAGE}
+AC_DEFINE_UNQUOTED([LOOLWSD_CONFIGDIR],["$LOOLWSD_CONFIGDIR"],[Config folder])
+AC_SUBST(LOOLWSD_CONFIGDIR)
+
AC_CONFIG_FILES([Makefile
test/Makefile
loolwsd.spec])
diff --git a/loolwsd/loolwsd.xml b/loolwsd/loolwsd.xml
index 2bdc6ea..5945ba2 100644
--- a/loolwsd/loolwsd.xml
+++ b/loolwsd/loolwsd.xml
@@ -1,7 +1,7 @@
<config>
<ssl desc="SSL settings">
- <cert_file_path desc="Path to the cert file" relative="true">cert.pem</cert_file_path>
- <key_file_path desc="Path to the key file" relative="true">key.pem</key_file_path>
+ <cert_file_path desc="Path to the cert file" relative="false">/etc/loolwsd/cert.pem</cert_file_path>
+ <key_file_path desc="Path to the key file" relative="false">/etc/loolwsd/key.pem</key_file_path>
</ssl>
<storage desc="Backend storage">
<filesystem allow="true">
More information about the Libreoffice-commits
mailing list