afm-unit conf: Remove useless tests
[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 Requires=UNIT_NAME_API_BASE({{name}})@%i.socket
27 After=UNIT_NAME_API_BASE({{name}})@%i.socket
28
29 [Service]
30 Type=oneshot
31 RemainAfterExit=yes
32 ExecStart=/bin/true
33
34 %end systemd-unit
35
36 ;-------------------------------------------------------------------------------
37 ;----        T H E   S O C K E T   O F   T H E   A P I                      ----
38 ;-------------------------------------------------------------------------------
39
40 %begin systemd-unit
41
42 # auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
43
44 %systemd-unit system
45 %systemd-unit socket UNIT_NAME_API_BASE({{name}})@
46 [Unit]
47 Description=Provides websocket api {{name}} for user %i
48 Requires=afm-user-setup@%i.service
49 After=afm-user-setup@%i.service
50 DefaultDependencies=no
51
52 [Socket]
53 SmackLabel=*
54 SmackLabelIPIn=System
55 SmackLabelIPOut=System
56 ListenStream=API_PATH_WS/{{name}}
57 FileDescriptorName={{name}}
58 Service=UNIT_NAME_SERVICE
59
60 %end systemd-unit
61
62
63 {{/value=ws|auto}}
64
65 {{/provided-api}}
66
67