aboutsummaryrefslogtreecommitdiffstats
path: root/conf/unit/provided-api-user.inc
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-05-15 20:49:14 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-06-14 11:17:53 +0200
commit77bd42075de481ae89f6a5b2bc8a79bf967d95cd (patch)
tree276904b4bc22397f56a6df883763f87fd68acc27 /conf/unit/provided-api-user.inc
parent3284913fccd1a8b6e9993eb9676d8d28f02c2151 (diff)
Introduce platform services
The platform services are services that run at the global platform scope as opposite to services that run in the context of the user. Bug-AGL: SPEC-1015 Change-Id: I08c2d47715cbc7436e67781d5e638386be531520 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/unit/provided-api-user.inc')
-rw-r--r--conf/unit/provided-api-user.inc53
1 files changed, 53 insertions, 0 deletions
diff --git a/conf/unit/provided-api-user.inc b/conf/unit/provided-api-user.inc
new file mode 100644
index 0000000..77478c8
--- /dev/null
+++ b/conf/unit/provided-api-user.inc
@@ -0,0 +1,53 @@
+dnl vim: set filetype=sysctl.conf.m4 syntax=sysctl.conf.m4:
+;-------------------------------------------------------------------------------
+;---- T H E S E R V I C E O F T H E A P I ----
+;-------------------------------------------------------------------------------
+%begin systemd-unit
+
+# auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
+
+%systemd-unit system
+%systemd-unit service UNIT_NAME_API_BASE({{name}})@
+
+[Unit]
+Description=Provides api {{name}} for user %i
+X-AFM-API-TYPE={{value}}
+
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+
+Requires=UNIT_NAME_API_BASE({{name}})@%i.socket
+After=UNIT_NAME_API_BASE({{name}})@%i.socket
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/true
+
+%end systemd-unit
+
+;-------------------------------------------------------------------------------
+;---- T H E S O C K E T O F T H E A P I ----
+;-------------------------------------------------------------------------------
+
+%begin systemd-unit
+
+# auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
+
+%systemd-unit system
+%systemd-unit socket UNIT_NAME_API_BASE({{name}})@
+[Unit]
+Description=Provides websocket api {{name}} for user %i
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+DefaultDependencies=no
+
+[Socket]
+SmackLabel=*
+SmackLabelIPIn=System
+SmackLabelIPOut=System
+ListenStream=USER_API_PATH_WS/{{name}}
+FileDescriptorName={{name}}
+Service=UNIT_NAME_BASE@%i.service
+
+%end systemd-unit