blob: bc65851aba1e02417d80cc929af37cd4e3d682c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
{{#targets.list}}
%begin systemd-unit
# auto generated by wgtpkg-unit for {{id}} version {{version}} target {{:#target}}
%nl
[unit]
Description={{description}}
X-Name={{name.content}}
X-Name-Short={{name.short}}
X-Id={{id}}
X-Idaver={{idaver}}
X-Target-Name={{:#target}}
X-Author={{{author.content}}}
X-Author-email={{author.email}}
%nl
# Adds check to smack
ConditionSecurity=smack
%nl
# Automatic bound to required api
{{#required-api.list}}
BindsTo=afm-api-{{name}}
After=afm-api-{{name}}
{{/required-api.list}}
%nl
[Service]
SmackProcessLabel=User::App::{{id}}
{{#required-permission.dict}}
{{#urn:AGL:permission::platform:no-oom}} OOMScoreAdjust=-500 {{/urn:AGL:permission::platform:no-oom}}
{{#urn:AGL:permission::partner:real-time}} IOSchedulingClass=realtime {{/urn:AGL:permission::partner:real-time}}
{{^urn:AGL:permission::partner:real-time}} RestrictRealtime=on {{/urn:AGL:permission::partner:real-time}}
{{#urn:AGL:permission::public:display}} SupplementaryGroups=display {{/urn:AGL:permission::public:display}}
{{^urn:AGL:permission::public:syscall:clock}} SystemCallFilter=~@clock {{/urn:AGL:permission::public:syscall:clock}}
{{^urn:AGL:permission::public:internet}} RestrictAddressFamilies=AF_UNIX {{/urn:AGL:permission::public:internet}}
{{/required-permission.dict}}
%nl
WorkingDirectory={{widget-app-data-dir}}
{{#content.type=text/html}}
%systemd-unit user
%systemd-unit service afm-appli-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}}
ExecStart=/usr/bin/afb-daemon --port=%P --random-token \
--rootdir={{widget-install-dir}} \
--workdir={{{widget-app-data-dir}}} \
--roothttp=htdocs \
{{#required-permission.dict.urn:AGL:permission::public:applications:read}}\
--alias=/icons:{{widget-icons-dir}} \
\{{/required-permission.dict.urn:AGL:permission::public:applications:read}}
{{#required-api}}\
--ws-client=unix:%t/bindings/{{:#target}}
\{{/required-api}}
--exec /usr/bin/web-runtime http://localhost:@p/{{content.src}}?token=@t
{{/content.type=text/html}}
{{#content.type=application/vnd.agl.service}}
%systemd-unit user
%systemd-unit service afm-api-{{:#target}}
ExecStart=/usr/bin/afb-daemon \
--rootdir={{widget-install-dir}} \
--workdir={{{widget-app-data-dir}}} \
--no-httpd \
--ws-server=unix:%t/bindings/{{:#target}}
%end systemd-unit
%begin systemd-unit
# auto generated by wgtpkg-unit for {{id}} version {{version}} target {{:#target}}
#
%systemd-unit user
%systemd-unit socket afm-api-{{:#target}}
[socket]
SmackLabel=*
ListenStream=%t/bindings/{{:#target}}
{{/content.type=application/vnd.agl.service}}
%end systemd-unit
{{/targets.list}}
|