Add the external binding feature
[src/app-framework-main.git] / conf / unit / generate-unit-conf / provided-api.inc
1 dnl vim: set filetype=sysctl.conf.m4 syntax=sysctl.conf.m4:
2 ;-------------------------------------------------------------------------------
3 ;----        P R O V I D E D   A P I S                                      ----
4 ;-------------------------------------------------------------------------------
5
6 {{#provided-api}}
7
8 ;-------------------------------------------------------------------------------
9 ;----        T H E   S E R V I C E   O F   T H E   A P I                    ----
10 ;-------------------------------------------------------------------------------
11 %begin systemd-unit
12
13 # auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
14
15 %systemd-unit system
16 %systemd-unit service UNIT_NAME_API_BASE({{name}})@
17
18 [Unit]
19 Description=Provides api {{name}} for user %i
20 X-AFM-API-TYPE={{value}}
21
22 Requires=afm-user-setup@%i.service
23 After=afm-user-setup@%i.service
24
25 {{#value=ws|auto}}
26 Requires=UNIT_NAME_API_BASE({{name}})@%i.socket
27 After=UNIT_NAME_API_BASE({{name}})@%i.socket
28 {{/value=ws|auto}}
29
30 [Service]
31 Type=oneshot
32 RemainAfterExit=yes
33 {{#value=ws|auto}}
34 ExecStart=/bin/true
35 {{/value=ws|auto}}
36
37 %end systemd-unit
38
39
40 ;-------------------------------------------------------------------------------
41 ;----        T H E   S O C K E T   O F   T H E   A P I                      ----
42 ;-------------------------------------------------------------------------------
43 {{#value=ws|auto}}
44
45 %begin systemd-unit
46
47 # auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
48
49 %systemd-unit system
50 %systemd-unit socket UNIT_NAME_API_BASE({{name}})@
51 [Unit]
52 Description=Provides websocket api {{name}} for user %i
53 Requires=afm-user-setup@%i.service
54 After=afm-user-setup@%i.service
55 DefaultDependencies=no
56
57 [Socket]
58 SmackLabel=*
59 SmackLabelIPIn=System
60 SmackLabelIPOut=System
61 ListenStream=USER_RUN_DIR/apis/ws/{{name}}
62 FileDescriptorName={{name}}
63 Service=UNIT_NAME_SERVICE
64
65 %end systemd-unit
66
67
68 {{/value=ws|auto}}
69
70 {{/provided-api}}
71
72