From: José Bollo Date: Thu, 28 Mar 2019 10:36:05 +0000 (+0100) Subject: afm-unit.conf: Add widget specific environment X-Git-Tag: 7.99.1~7 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-main.git;a=commitdiff_plain;h=20bf07791d69cd25b73139379ccb8947c5f1b2f7 afm-unit.conf: Add widget specific environment This change allow to set environment specific to a widget in ${afm_confdir}/widget.env.d/ID/* files where ID is the ID of the widget. Setting specific environment for a given widget was not possible (except in devel/debug) before. Change-Id: I8ef9349fda9adb8eecf330ce97cc7ebcd21bf399 Signed-off-by: José Bollo --- diff --git a/conf/unit/CMakeLists.txt b/conf/unit/CMakeLists.txt index 6e64400..1d11e11 100644 --- a/conf/unit/CMakeLists.txt +++ b/conf/unit/CMakeLists.txt @@ -26,6 +26,7 @@ endif() if(NOT USE_SDK) install(DIRECTORY DESTINATION ${afm_confdir}/unit.env.d) + install(DIRECTORY DESTINATION ${afm_confdir}/widget.env.d) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-unit.conf DESTINATION ${afm_confdir}) endif() diff --git a/conf/unit/afm-unit-debug.conf.in b/conf/unit/afm-unit-debug.conf.in index 0042d3e..9821e9f 100644 --- a/conf/unit/afm-unit-debug.conf.in +++ b/conf/unit/afm-unit-debug.conf.in @@ -134,6 +134,7 @@ After=afm-api-{{name}}@%i.socket %nl [Service] EnvironmentFile=-@afm_confdir@/unit.env.d/* +EnvironmentFile=-@afm_confdir@/widget.env.d/{{:id}}/* SmackProcessLabel=User::App::{{:id}} SuccessExitStatus=0 SIGKILL User=%i diff --git a/conf/unit/afm-unit.conf.in b/conf/unit/afm-unit.conf.in index 09befb6..9e95e11 100644 --- a/conf/unit/afm-unit.conf.in +++ b/conf/unit/afm-unit.conf.in @@ -134,6 +134,7 @@ After=afm-api-{{name}}@%i.socket %nl [Service] EnvironmentFile=-@afm_confdir@/unit.env.d/* +EnvironmentFile=-@afm_confdir@/widget.env.d/{{:id}}/* SmackProcessLabel=User::App::{{:id}} SuccessExitStatus=0 SIGKILL User=%i diff --git a/conf/unit/generate-unit-conf/service.inc b/conf/unit/generate-unit-conf/service.inc index 6620243..fdafc5c 100644 --- a/conf/unit/generate-unit-conf/service.inc +++ b/conf/unit/generate-unit-conf/service.inc @@ -65,6 +65,7 @@ After=UNIT_NAME_API_SOCKET({{name}},%i) [Service] EnvironmentFile=-AFM_CONFIG_DIR/unit.env.d/* +EnvironmentFile=-AFM_CONFIG_DIR/widget.env.d/{{:id}}/* SmackProcessLabel=User::App::{{:id}} SuccessExitStatus=0 SIGKILL