aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/afm-unit-debug.conf.in14
-rw-r--r--conf/afm-unit.conf.in14
-rw-r--r--conf/generate-unit-conf/afm-unit1
-rw-r--r--conf/generate-unit-conf/binder.inc2
-rw-r--r--conf/generate-unit-conf/service.inc12
5 files changed, 22 insertions, 21 deletions
diff --git a/conf/afm-unit-debug.conf.in b/conf/afm-unit-debug.conf.in
index 7588d32..5724e69 100644
--- a/conf/afm-unit-debug.conf.in
+++ b/conf/afm-unit-debug.conf.in
@@ -106,7 +106,7 @@ X-AFM--target-name={{:#target}}
X-AFM--content={{content.src}}
X-AFM--type={{content.type}}
X-AFM--wgtdir={{:#metadata.install-dir}}
-X-AFM--workdir={{&#metadata.app-data-dir}}/{{:id}}
+X-AFM--workdir=/home/%i/app-data/{{:id}}
%nl
Wants=sockets.target
# Adds check to smack
@@ -134,13 +134,13 @@ AmbientCapabilities=
{{#required-permission.urn:AGL:permission::public:display}}SupplementaryGroups=display{{/required-permission.urn:AGL:permission::public:display}}
{{^required-permission.urn:AGL:permission::public:syscall:clock}}SystemCallFilter=~@clock{{/required-permission.urn:AGL:permission::public:syscall:clock}}
%nl
-WorkingDirectory=-{{&#metadata.app-data-dir}}/{{:id}}
-ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{:id}}
+WorkingDirectory=-/home/%i/app-data/{{:id}}
+ExecStartPre=/bin/mkdir -p /home/%i/app-data/{{:id}}
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}
-Environment=XDG_DATA_HOME={{&#metadata.app-data-dir}}/{{:id}}
-Environment=XDG_CONFIG_HOME={{&#metadata.app-data-dir}}/{{:id}}
-Environment=XDG_CACHE_HOME={{&#metadata.app-data-dir}}/{{:id}}
+Environment=XDG_DATA_HOME=/home/%i/app-data/{{:id}}
+Environment=XDG_CONFIG_HOME=/home/%i/app-data/{{:id}}
+Environment=XDG_CACHE_HOME=/home/%i/app-data/{{:id}}
Environment=XDG_RUNTIME_DIR=/run/user/%i
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
Environment=LD_LIBRARY_PATH=$ORIGIN/lib
@@ -161,7 +161,7 @@ X-AFM-http-port={{:#metadata.http-port}}
ExecStart=/usr/bin/afb-daemon \
--name afbd-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} \
--rootdir={{:#metadata.install-dir}} \
- --workdir={{&#metadata.app-data-dir}}/{{id}} \
+ --workdir=/home/%i/app-data/{{id}} \
--verbose \
--verbose \
--monitoring \
diff --git a/conf/afm-unit.conf.in b/conf/afm-unit.conf.in
index 8ccf861..d0b60fa 100644
--- a/conf/afm-unit.conf.in
+++ b/conf/afm-unit.conf.in
@@ -106,7 +106,7 @@ X-AFM--target-name={{:#target}}
X-AFM--content={{content.src}}
X-AFM--type={{content.type}}
X-AFM--wgtdir={{:#metadata.install-dir}}
-X-AFM--workdir={{&#metadata.app-data-dir}}/{{:id}}
+X-AFM--workdir=/home/%i/app-data/{{:id}}
%nl
Wants=sockets.target
# Adds check to smack
@@ -134,13 +134,13 @@ AmbientCapabilities=
{{#required-permission.urn:AGL:permission::public:display}}SupplementaryGroups=display{{/required-permission.urn:AGL:permission::public:display}}
{{^required-permission.urn:AGL:permission::public:syscall:clock}}SystemCallFilter=~@clock{{/required-permission.urn:AGL:permission::public:syscall:clock}}
%nl
-WorkingDirectory=-{{&#metadata.app-data-dir}}/{{:id}}
-ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{:id}}
+WorkingDirectory=-/home/%i/app-data/{{:id}}
+ExecStartPre=/bin/mkdir -p /home/%i/app-data/{{:id}}
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}
-Environment=XDG_DATA_HOME={{&#metadata.app-data-dir}}/{{:id}}
-Environment=XDG_CONFIG_HOME={{&#metadata.app-data-dir}}/{{:id}}
-Environment=XDG_CACHE_HOME={{&#metadata.app-data-dir}}/{{:id}}
+Environment=XDG_DATA_HOME=/home/%i/app-data/{{:id}}
+Environment=XDG_CONFIG_HOME=/home/%i/app-data/{{:id}}
+Environment=XDG_CACHE_HOME=/home/%i/app-data/{{:id}}
Environment=XDG_RUNTIME_DIR=/run/user/%i
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
Environment=LD_LIBRARY_PATH=$ORIGIN/lib
@@ -160,7 +160,7 @@ X-AFM--http-port={{:#metadata.http-port}}
ExecStart=/usr/bin/afb-daemon \
--name afbd-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} \
--rootdir={{:#metadata.install-dir}} \
- --workdir={{&#metadata.app-data-dir}}/{{id}} \
+ --workdir=/home/%i/app-data/{{id}} \
{{#content.type=application/vnd.agl.service}} \
--no-httpd \
{{/content.type=application/vnd.agl.service}}{{^content.type=application/vnd.agl.service}} \
diff --git a/conf/generate-unit-conf/afm-unit b/conf/generate-unit-conf/afm-unit
index e3abf19..58fe851 100644
--- a/conf/generate-unit-conf/afm-unit
+++ b/conf/generate-unit-conf/afm-unit
@@ -46,6 +46,7 @@ define( `TARGET', `{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}')
define( `UNIT_NAME_BASE', `afm-ON_PERM(`:public:hidden', `service', `appli')-{{:id}}--{{:ver}}--{{:#target}}')
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')
-----------------------------------------------------------------------
--
diff --git a/conf/generate-unit-conf/binder.inc b/conf/generate-unit-conf/binder.inc
index a99467a..48915c0 100644
--- a/conf/generate-unit-conf/binder.inc
+++ b/conf/generate-unit-conf/binder.inc
@@ -10,7 +10,7 @@ ENDIF
ExecStart=/usr/bin/afb-daemon \
--name afbd-TARGET \
--rootdir={{:#metadata.install-dir}} \
- --workdir={{&#metadata.app-data-dir}}/{{id}} \
+ --workdir=APP_DATA_DIR/{{id}} \
IF_AGL_DEVEL \
--verbose \
--verbose \
diff --git a/conf/generate-unit-conf/service.inc b/conf/generate-unit-conf/service.inc
index 040eb16..be1f7aa 100644
--- a/conf/generate-unit-conf/service.inc
+++ b/conf/generate-unit-conf/service.inc
@@ -30,7 +30,7 @@ X-AFM--target-name={{:#target}}
X-AFM--content={{content.src}}
X-AFM--type={{content.type}}
X-AFM--wgtdir={{:#metadata.install-dir}}
-X-AFM--workdir={{&#metadata.app-data-dir}}/{{:id}}
+X-AFM--workdir=APP_DATA_DIR/{{:id}}
%nl
Wants=sockets.target
@@ -66,13 +66,13 @@ ON_PERM(:public:display, SupplementaryGroups=display)
ON_PERM(:public:syscall:clock, , SystemCallFilter=~@clock)
%nl
-WorkingDirectory=-{{&#metadata.app-data-dir}}/{{:id}}
-ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{:id}}
+WorkingDirectory=-APP_DATA_DIR/{{:id}}
+ExecStartPre=/bin/mkdir -p APP_DATA_DIR/{{:id}}
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}
-Environment=XDG_DATA_HOME={{&#metadata.app-data-dir}}/{{:id}}
-Environment=XDG_CONFIG_HOME={{&#metadata.app-data-dir}}/{{:id}}
-Environment=XDG_CACHE_HOME={{&#metadata.app-data-dir}}/{{:id}}
+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=LD_LIBRARY_PATH=$ORIGIN/lib