aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorjobol <jose.bollo@iot.bzh>2017-12-07 16:49:03 +0100
committerjobol <jose.bollo@iot.bzh>2017-12-07 16:49:03 +0100
commitab88c4c85be6dbbe31489534462c53b5c2a0fb50 (patch)
tree44e1165868e12268798a6cc4f6f66d6417fad43f /conf
parent1bec325ee85192eba57673750b9e4a77a1a970c8 (diff)
unit.cont: Refactor PATH and LD_LIBRARY_PATH
Change-Id: Ic6da02c0039421fd5656238f5fa812574af1c268 Signed-off-by: jobol <jose.bollo@iot.bzh>
Diffstat (limited to 'conf')
-rw-r--r--conf/unit/afm-unit-debug.conf.in4
-rw-r--r--conf/unit/afm-unit.conf.in4
-rw-r--r--conf/unit/generate-unit-conf/service.inc4
3 files changed, 6 insertions, 6 deletions
diff --git a/conf/unit/afm-unit-debug.conf.in b/conf/unit/afm-unit-debug.conf.in
index ed8d094..ab1ec79 100644
--- a/conf/unit/afm-unit-debug.conf.in
+++ b/conf/unit/afm-unit-debug.conf.in
@@ -140,13 +140,13 @@ Slice=user-%i.slice
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=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}}
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
; Needed to enable debug
Environment=AFM_ID={{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
EnvironmentFile=-/var/run/afm-debug/{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}.env
diff --git a/conf/unit/afm-unit.conf.in b/conf/unit/afm-unit.conf.in
index a0a397a..ad5ecd7 100644
--- a/conf/unit/afm-unit.conf.in
+++ b/conf/unit/afm-unit.conf.in
@@ -140,13 +140,13 @@ Slice=user-%i.slice
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=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}}
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
SyslogIdentifier=afbd-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
StandardInput=null
StandardOutput=journal
diff --git a/conf/unit/generate-unit-conf/service.inc b/conf/unit/generate-unit-conf/service.inc
index a860360..0d784da 100644
--- a/conf/unit/generate-unit-conf/service.inc
+++ b/conf/unit/generate-unit-conf/service.inc
@@ -75,13 +75,13 @@ ON_PERM(:public:syscall:clock, , SystemCallFilter=~@clock)
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=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}}
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
IF_AGL_DEVEL
; Needed to enable debug