aboutsummaryrefslogtreecommitdiffstats
path: root/conf/afm-unit.conf
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-03-14 16:05:22 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2017-03-17 13:01:40 +0100
commit366f2093c78347dbee190eff929052a969724076 (patch)
tree715d13eaf683c0995c04e9538c2f4d1e273d61e4 /conf/afm-unit.conf
parent863bf1c6b4e10176edf8b26a9703109ab8db2c43 (diff)
afm-unit.conf: adds type application/x-executable
Change-Id: Ie62113512094909bd02e7e89fd44b56a9df67d17 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/afm-unit.conf')
-rw-r--r--conf/afm-unit.conf16
1 files changed, 14 insertions, 2 deletions
diff --git a/conf/afm-unit.conf b/conf/afm-unit.conf
index 437d053..18ade85 100644
--- a/conf/afm-unit.conf
+++ b/conf/afm-unit.conf
@@ -77,6 +77,7 @@ After=afm-api-{{name}}
[Service]
SmackProcessLabel=User::App::{{id}}
+SuccessExitStatus=0 SIGKILL
{{#required-permission}}
{{#urn:AGL:permission::platform:no-oom}} OOMScoreAdjust=-500 {{/urn:AGL:permission::platform:no-oom}}
@@ -88,7 +89,8 @@ SmackProcessLabel=User::App::{{id}}
%nl
WorkingDirectory={{&#metadata.app-data-dir}}
-SuccessExitStatus=0 SIGKILL
+Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
+
;---------------------------------------------------------------------------------
{{#content.type=text/html}}
@@ -131,6 +133,17 @@ ExecStart=/usr/bin/afb-daemon --port={{:#metadata.http-port}} --random-token \
{{/content.type=text/html}}
;---------------------------------------------------------------------------------
+{{#content.type=application/x-executable}}
+
+%systemd-unit user
+%systemd-unit service afm-appli-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
+Environment=LD_LIBRARY_PATH=$ORIGIN/$LIB
+
+ExecStart={{:#metadata.install-dir}}/{{content.src}}
+
+{{/content.type=application/x-executable}}
+
+;---------------------------------------------------------------------------------
{{#content.type=application/vnd.agl.service}}
%systemd-unit user
@@ -176,4 +189,3 @@ WantedBy=default.target
%end systemd-unit
{{/targets}}
-