From dcf194289a6af8c0a6b6263a2686af8fa44a37f2 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 21 Mar 2017 17:54:30 +0100 Subject: Allows or in mustache instanciation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows to simplify the configuration file afm-unit.conf. Restore the type application/vnd.agl.service Change-Id: Iaadde2c2d96155cea6d1b8bee4d3c78e885cf44a Signed-off-by: José Bollo --- conf/afm-unit.conf | 113 +++++++++++------------------------------------------ 1 file changed, 22 insertions(+), 91 deletions(-) (limited to 'conf') diff --git a/conf/afm-unit.conf b/conf/afm-unit.conf index 82113ef..5fbba96 100644 --- a/conf/afm-unit.conf +++ b/conf/afm-unit.conf @@ -137,14 +137,19 @@ Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}} {{/required-permission.urn:AGL:permission::public:hidden}}\ ;--------------------------------------------------------------------------------- -;---- text/html ---- +;---- text/html application/vnd.agl.native application/vnd.agl.service ---- ;--------------------------------------------------------------------------------- -{{#content.type=text/html}} +{{#content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}} +{{^content.type=application/vnd.agl.service}} X-AFM--http-port={{:#metadata.http-port}} +{{/content.type=application/vnd.agl.service}} + ExecStart=/usr/bin/afb-daemon \ - --port={{:#metadata.http-port}} \ - --random-token \ + {{^content.type=application/vnd.agl.service}}\ + --port={{:#metadata.http-port}} \ + --random-token \ + {{/content.type=application/vnd.agl.service}}\ --rootdir={{:#metadata.install-dir}} \ --workdir={{&#metadata.app-data-dir}}/{{id}} \ {{#required-permission.urn:AGL:permission::public:no-htdocs}}\ @@ -192,9 +197,18 @@ ExecStart=/usr/bin/afb-daemon \ --dbus-server={{name}} \ {{/value=dbus}}\ {{/provided-api}}\ - --exec /usr/bin/web-runtime http://localhost:@p/{{content.src}}?token=@t + {{#content.type=text/html}}\ + --exec /usr/bin/web-runtime http://localhost:@p/{{content.src}}?token=@t \ + {{/content.type=text/html}}\ + {{#content.type=application/vnd.agl.native}}\ + --exec {{:#metadata.install-dir}}/{{content.src}} @p @t \ + {{/content.type=application/vnd.agl.native}}\ + {{#content.type=application/vnd.agl.service}}\ + --no-httpd \ + {{/content.type=application/vnd.agl.service}} + +{{/content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}} -{{/content.type=text/html}} ;--------------------------------------------------------------------------------- ;---- application/x-executable ---- @@ -207,56 +221,6 @@ ExecStart={{:#metadata.install-dir}}/{{content.src}} {{/content.type=application/x-executable}} -;--------------------------------------------------------------------------------- -;---- application/vnd.agl.service ---- -;--------------------------------------------------------------------------------- -{{#content.type=application/vnd.agl.service}} - -ExecStart=/usr/bin/afb-daemon \ - --rootdir={{:#metadata.install-dir}} \ - --workdir={{&#metadata.install-dir}}/{{id}} \ - {{#required-api}}\ - {{#value=auto}}\ - --ws-client=unix:%t/apis/ws/{{name}} \ - {{/value=auto}}\ - {{#value=ws}}\ - --ws-client=unix:%t/apis/ws/{{name}} \ - {{/value=ws}}\ - {{#value=dbus}}\ - --dbus-client={{name}} \ - {{/value=dbus}}\ - {{#value=link}}\ - --binding=%t/apis/lib/{{name}} \ - {{/value=link}}\ - {{#value=cloud}}\ - --cloud-client={{name}} \ - {{/value=cloud}}\ - {{#value=local}}\ - --binding={{:#metadata.install-dir}}/{{name}} \ - {{/value=local}}\ - {{/required-api}}\ - {{#provided-api}}\ - {{#value=auto}}\ - {{^required-permission.urn:AGL:permission::partner:service:no-ws}}\ - --ws-server=sd:{{name}} \ - {{/required-permission.urn:AGL:permission::partner:service:no-ws}}\ - {{^required-permission.urn:AGL:permission::partner:service:no-dbus}}\ - --dbus-server={{name}} \ - {{/required-permission.urn:AGL:permission::partner:service:no-dbus}}\ - {{/value=auto}}\ - {{#value=ws}}\ - --ws-server=sd:{{name}} \ - {{/value=ws}}\ - {{#value=dbus}}\ - --dbus-server={{name}} \ - {{/value=dbus}}\ - {{/provided-api}}\ - --no-httpd - - -{{/content.type=application/vnd.agl.service}} - - ;--------------------------------------------------------------------------------- ; auto start ;--------------------------------------------------------------------------------- @@ -277,40 +241,7 @@ WantedBy=default.target ;--------------------------------------------------------------------------------- {{#provided-api}} -{{#value=ws}} - -%begin systemd-unit - -# auto generated by wgtpkg-unit for {{id}} version {{version}} target {{:#target}} of {{idaver}} -# -%systemd-unit user -%systemd-unit socket afm-socket-{{name}} - -[Socket] -SmackLabel=* -ListenStream=%t/bindings/{{name}} -FileDescriptorName={{name}} - -{{#required-permission.urn:AGL:permission::public:hidden}}\ -Service=afm-service-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} -{{/required-permission.urn:AGL:permission::public:hidden}}\ -{{^required-permission.urn:AGL:permission::public:hidden}}\ -Service=afm-appli-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} -{{/required-permission.urn:AGL:permission::public:hidden}}\ - -;--------------------------------------------------------------------------------- -{{#required-permission.urn:AGL:permission::system:run-by-default}} -%nl -[Install] -WantedBy=default.target -%systemd-unit wanted-by default.target -{{/required-permission.urn:AGL:permission::system:run-by-default}} -;--------------------------------------------------------------------------------- - -%end systemd-unit - -{{/value=ws}} -{{#value=auto}} +{{#value=ws|auto}} %begin systemd-unit @@ -342,7 +273,7 @@ WantedBy=default.target %end systemd-unit -{{/value=auto}} +{{/value=ws|auto}} {{/provided-api}} {{/targets}} -- cgit 1.2.3-korg