allow to set daemon config via shell param
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 17 Jul 2017 15:47:17 +0000 (17:47 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 17 Jul 2017 17:42:38 +0000 (19:42 +0200)
Change-Id: I7afc1787c044ce3a3809d89c90f86e2538685293
Reviewed-on: http://gerrit.tine20.com/customers/5217
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/library/Console/Daemon.php

index e841ccc..7f28e27 100644 (file)
@@ -321,7 +321,13 @@ abstract class Console_Daemon
             /** @noinspection PhpUndefinedFieldInspection */
             $config->general->pidfile = $opts->p;
         }
             /** @noinspection PhpUndefinedFieldInspection */
             $config->general->pidfile = $opts->p;
         }
-        
+
+        // config file path
+        if (isset($opts->config)) {
+            /** @noinspection PhpUndefinedFieldInspection */
+            $config->general->configfile = $opts->config;
+        }
+
         // become daemon
         if (isset($opts->d)) {
             /** @noinspection PhpUndefinedFieldInspection */
         // become daemon
         if (isset($opts->d)) {
             /** @noinspection PhpUndefinedFieldInspection */