diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-11-08 14:47:10 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-11-08 14:47:10 +0100 |
commit | 94176d9f5f1a5d9b1f298000c2868ebab148d805 (patch) | |
tree | d04e95bd7c748b021c6559aca373e012af5c6c3b /conf/unit/afm-unit-debug.conf.in | |
parent | 44c70fd80a3ff8931aa97555ceaf5ed578e4f8be (diff) |
afm-unit: Export new variables
Export the new variables:
- AFM_ID: the identifier of the application
- AFM_WORKDIR: the workdir of the application
- AFM_WSAPI_DIR: the directory where APIs can
be accessed
Change-Id: I79b46754f84161a36d9a13dd79bc94e777c854fe
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/unit/afm-unit-debug.conf.in')
-rw-r--r-- | conf/unit/afm-unit-debug.conf.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/conf/unit/afm-unit-debug.conf.in b/conf/unit/afm-unit-debug.conf.in index 7ffeb2f..582e723 100644 --- a/conf/unit/afm-unit-debug.conf.in +++ b/conf/unit/afm-unit-debug.conf.in @@ -146,7 +146,10 @@ Slice=user-%i.slice %nl WorkingDirectory=-/home/%i/app-data/{{:id}} ExecStartPre=/bin/mkdir -p /home/%i/app-data/{{:id}} +Environment=AFM_ID={{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}} +Environment=AFM_WORKDIR=/home/%i/app-data/{{:id}} +Environment=AFM_WSAPI_DIR=@afm_users_rundir@/%i/apis/ws Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}/bin Environment=LD_LIBRARY_PATH={{:#metadata.install-dir}}/lib Environment=XDG_DATA_HOME=/home/%i/app-data/{{:id}} @@ -155,7 +158,6 @@ Environment=XDG_CACHE_HOME=/home/%i/app-data/{{:id}} Environment=XDG_RUNTIME_DIR=@afm_users_rundir@/%i Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=@afm_users_rundir@/%i/bus ; Needed to enable debug -Environment=AFM_ID={{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} EnvironmentFile=-@afm_platform_rundir@/debug/{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}.env SyslogIdentifier=afbd-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} StandardInput=null |