summaryrefslogtreecommitdiffstats
path: root/conf/unit/generate-unit-conf
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-02-27 15:07:54 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-02-28 09:15:17 +0100
commit3d50d615fbd4322315dd66859d886576e208b36d (patch)
treecb94b3865a65f5210d253eb52763ea68bfad68ba /conf/unit/generate-unit-conf
parente6fc32e9185b5d6c1ea97714a37f1112b54f64fb (diff)
Add configuration variables for runtime socket dirs
2 new configuration variables: - afm_platform_rundir (default /run/platform) Path to location of platform runtime sockets - afm_users_rundir (default /run/user) Path to location of users runtime sockets Change-Id: I65007fee1ca2ce6f1247a67ba0b121f97c08f209 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/unit/generate-unit-conf')
-rw-r--r--conf/unit/generate-unit-conf/afm-unit3
-rw-r--r--conf/unit/generate-unit-conf/service.inc6
2 files changed, 5 insertions, 4 deletions
diff --git a/conf/unit/generate-unit-conf/afm-unit b/conf/unit/generate-unit-conf/afm-unit
index 9a8cd62..e2fb7d0 100644
--- a/conf/unit/generate-unit-conf/afm-unit
+++ b/conf/unit/generate-unit-conf/afm-unit
@@ -52,7 +52,8 @@ define( `UNIT_NAME_BASE', `afm-ON_PERM(`:public:hidden', `service', `appli')-{{:
define( `UNIT_NAME_SERVICE', `UNIT_NAME_BASE%i.service')
define( `UNIT_NAME_SOCKET_FOR', `afm-api-ws-$1@%i.socket')
define( `APP_DATA_DIR', `/home/%i/app-data')
-define( `USER_RUN_DIR', `/run/user/%i')
+define( `USER_RUN_DIR', `@afm_users_rundir@/%i')
+define( `DEBUGGING_DIR', `@afm_platform_rundir@/debug')
-----------------------------------------------------------------------
--
diff --git a/conf/unit/generate-unit-conf/service.inc b/conf/unit/generate-unit-conf/service.inc
index 0d784da..88e4346 100644
--- a/conf/unit/generate-unit-conf/service.inc
+++ b/conf/unit/generate-unit-conf/service.inc
@@ -80,13 +80,13 @@ Environment=LD_LIBRARY_PATH={{:#metadata.install-dir}}/lib
Environment=XDG_DATA_HOME=APP_DATA_DIR/{{:id}}
Environment=XDG_CONFIG_HOME=APP_DATA_DIR/{{:id}}
Environment=XDG_CACHE_HOME=APP_DATA_DIR/{{:id}}
-Environment=XDG_RUNTIME_DIR=/run/user/%i
-Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
+Environment=XDG_RUNTIME_DIR=USER_RUN_DIR
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=USER_RUN_DIR/bus
IF_AGL_DEVEL
; Needed to enable debug
Environment=AFM_ID=TARGET
-EnvironmentFile=-/var/run/afm-debug/TARGET.env
+EnvironmentFile=-DEBUGGING_DIR/TARGET.env
ENDIF
SyslogIdentifier=afbd-TARGET