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