summaryrefslogtreecommitdiffstats
path: root/conf/unit/generate-unit-conf/service.inc
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-11-08 14:47:10 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-11-08 14:47:10 +0100
commit94176d9f5f1a5d9b1f298000c2868ebab148d805 (patch)
treed04e95bd7c748b021c6559aca373e012af5c6c3b /conf/unit/generate-unit-conf/service.inc
parent44c70fd80a3ff8931aa97555ceaf5ed578e4f8be (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/generate-unit-conf/service.inc')
-rw-r--r--conf/unit/generate-unit-conf/service.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/conf/unit/generate-unit-conf/service.inc b/conf/unit/generate-unit-conf/service.inc
index 5b146ee..961a262 100644
--- a/conf/unit/generate-unit-conf/service.inc
+++ b/conf/unit/generate-unit-conf/service.inc
@@ -81,7 +81,10 @@ ON_PERM(:public:syscall:clock, , SystemCallFilter=~@clock)
WorkingDirectory=-APP_DATA_DIR/{{:id}}
ExecStartPre=/bin/mkdir -p APP_DATA_DIR/{{:id}}
+Environment=AFM_ID=TARGET
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
+Environment=AFM_WORKDIR=APP_DATA_DIR/{{:id}}
+Environment=AFM_WSAPI_DIR=API_PATH_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=APP_DATA_DIR/{{:id}}
@@ -92,7 +95,6 @@ Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=USER_RUN_DIR/bus
IF_AGL_DEVEL
; Needed to enable debug
-Environment=AFM_ID=TARGET
EnvironmentFile=-DEBUGGING_DIR/TARGET.env
ENDIF