[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - tools/Config.cpp

Jan Holesovsky kendy at collabora.com
Tue Mar 20 14:35:35 UTC 2018


 tools/Config.cpp |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 32eaedec955cec15b30917001b1fc24551141119
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Mar 15 10:39:09 2018 +0100

    loolconfig: Create a shortcut for running the systemplate update.
    
    Change-Id: I082cf6e3f560a9c1880f0680ad4d2876d055dbc4
    Reviewed-on: https://gerrit.libreoffice.org/51314
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/tools/Config.cpp b/tools/Config.cpp
index 072afd0b4..20723fe25 100644
--- a/tools/Config.cpp
+++ b/tools/Config.cpp
@@ -98,11 +98,12 @@ void Config::displayHelp()
     // Command list
     std::cout << std::endl
               << "Commands: " << std::endl
-              << "    set-admin-password\n"
+              << "    set-admin-password" << std::endl
 #if ENABLE_SUPPORT_KEY
-              << "    set-support-key\n"
+              << "    set-support-key" << std::endl
 #endif
-              << "    set <key> <value>" << std::endl;
+              << "    set <key> <value>" << std::endl
+              << "    update-system-template" << std::endl << std::endl;
 }
 
 void Config::defineOptions(OptionSet& optionSet)
@@ -322,6 +323,13 @@ int Config::main(const std::vector<std::string>& args)
                       << "    set logging.level trace" << std::endl;
 
     }
+    else if (args[0] == "update-system-template")
+    {
+        const char command[] = "su lool --shell=/bin/sh -c 'loolwsd-systemplate-setup /opt/lool/systemplate " LO_PATH " >/dev/null 2>&1'";
+        std::cout << "Running the following command:" << std::endl
+                  << command << std::endl;
+        system(command);
+    }
     else
     {
         std::cerr << "No such command, \"" << args[0]  << "\"" << std::endl;


More information about the Libreoffice-commits mailing list