wgtpkg-unit: remove metadata.app-data-dir variable
[src/app-framework-main.git] / conf / generate-unit-conf / binder.inc
1
2 IF_AGL_DEVEL
3 X-AFM-http-port={{:#metadata.http-port}}
4 ELSE
5 IF_NOT_CONTENT(application/vnd.agl.service)
6 X-AFM--http-port={{:#metadata.http-port}}
7 ENDIF
8 ENDIF
9
10 ExecStart=/usr/bin/afb-daemon \
11         --name afbd-TARGET \
12         --rootdir={{:#metadata.install-dir}} \
13         --workdir=APP_DATA_DIR/{{id}} \
14 IF_AGL_DEVEL \
15         --verbose \
16         --verbose \
17         --monitoring \
18         --port={{:#metadata.http-port}} \
19         --token=HELLO \
20         --roothttp=ON_CONTENT(application/vnd.agl.service, ., ON_PERM(:public:no-htdocs, ., htdocs)) \
21 ELSE \
22         IF_CONTENT(application/vnd.agl.service) \
23                 --no-httpd \
24         ELSE \
25                 --port={{:#metadata.http-port}} \
26                 --random-token \
27                 --roothttp=ON_PERM(:public:no-htdocs, ., htdocs) \
28         ENDIF \
29 ENDIF \
30         ON_PERM(:public:applications:read, --alias=/icons:{{:#metadata.icons-dir}}) \
31         {{#required-api}} \
32                 ON_VALUE(auto|ws,       --ws-client=unix:%t/apis/ws/{{name}}) \
33                 ON_VALUE(dbus,          --dbus-client={{name}}) \
34                 ON_VALUE(link,          --binding=%t/apis/lib/{{name}}) \
35                 ON_VALUE(cloud,         --cloud-client={{name}}) \
36                 ON_VALUE(local,         --binding={{:#metadata.install-dir}}/{{name}}) \
37         {{/required-api}} \
38         {{#provided-api}} \
39                 ON_VALUE(auto|ws,       --ws-server=sd:{{name}}) \
40                 ON_VALUE(dbus,          --dbus-server={{name}}) \
41         {{/provided-api}} \
42         ON_CONTENT(text/html,                   --exec /usr/bin/web-runtime http://localhost:@p/{{content.src}}?token=@t) \
43         ON_CONTENT(application/vnd.agl.native,  --exec {{:#metadata.install-dir}}/{{content.src}} @p @t)
44