Remove tokens
[src/app-framework-main.git] / conf / unit / binder.inc
1 dnl vim: set filetype=sysctl.conf.m4 syntax=sysctl.conf.m4:
2
3 IF_AGL_DEVEL
4 X-AFM-http-port={{:#metatarget.http-port}}
5 ELSE
6 IF_NOT_CONTENT(application/vnd.agl.service)
7 X-AFM--http-port={{:#metatarget.http-port}}
8 ENDIF
9 ENDIF
10
11 Type=notify
12 ExecStart=/usr/bin/afb-daemon \
13         --name afbd-TARGET \
14         --rootdir={{:#metadata.install-dir}} \
15         --workdir=APP_WORK_DIR \
16 IF_AGL_DEVEL \
17         --verbose \
18         --verbose \
19         --monitoring \
20         --port={{:#metatarget.http-port}} \
21         --roothttp=ON_CONTENT(application/vnd.agl.service, ., ON_PERM(:public:no-htdocs, ., htdocs)) \
22 ELSE \
23         IF_CONTENT(application/vnd.agl.service) \
24                 --no-httpd \
25         ELSE \
26                 --port={{:#metatarget.http-port}} \
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:API_PATH_WS/{{name}}) \
33                 ON_VALUE(dbus,          --dbus-client={{name}}) \
34                 ON_VALUE(cloud,         --cloud-client={{name}}) \
35                 ON_VALUE(local,         --binding={{:#metadata.install-dir}}/{{name}}) \
36                 ON_VALUE(tcp,           --ws-client=tcp:{{name}}) \
37         {{/required-api}} \
38         {{#required-binding}} \
39                 ON_VALUE(local,         --binding={{:#metadata.install-dir}}/{{name}}) \
40                 ON_VALUE(extern,        --binding=API_PATH_LINK/{{name}}) \
41         {{/required-binding}} \
42         {{#provided-api}} \
43                 ON_VALUE(auto|ws,       --ws-server=sd:{{name}}) \
44                 ON_VALUE(dbus,          --dbus-server={{name}}) \
45                 ON_VALUE(tcp,           --ws-server=tcp:{{name}}) \
46         {{/provided-api}} \
47         ON_PERM(:platform:apis:auto-ws, --auto-api=API_PATH_WS) \
48         ON_CONTENT(text/html,                   --exec /usr/bin/web-runtime http://localhost:@p/{{content.src}}?token=@t) \
49         ON_CONTENT(application/vnd.agl.native,  --exec {{:#metadata.install-dir}}/{{content.src}} @p @t)
50 %nl