afm-unit: Export new variables
[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 {{#value=ws|auto}}
8
9 ;-------------------------------------------------------------------------------
10 ;----        T H E   S E R V I C E   O F   T H E   A P I                    ----
11 ;-------------------------------------------------------------------------------
12 %begin systemd-unit
13
14 # auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
15
16 %systemd-unit system
17 %systemd-unit service UNIT_NAME_API_BASE({{name}})@
18
19 [Unit]
20 Description=Provides api {{name}} for user %i
21 X-AFM-API-TYPE={{value}}
22
23 Requires=afm-user-setup@%i.service
24 After=afm-user-setup@%i.service
25
26 {{#value=ws|auto}}
27 Requires=UNIT_NAME_API_BASE({{name}})@%i.socket
28 After=UNIT_NAME_API_BASE({{name}})@%i.socket
29 {{/value=ws|auto}}
30
31 [Service]
32 Type=oneshot
33 RemainAfterExit=yes
34 {{#value=ws|auto}}
35 ExecStart=/bin/true
36 {{/value=ws|auto}}
37
38 %end systemd-unit
39
40
41 ;-------------------------------------------------------------------------------
42 ;----        T H E   S O C K E T   O F   T H E   A P I                      ----
43 ;-------------------------------------------------------------------------------
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=API_PATH_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