aboutsummaryrefslogtreecommitdiffstats
path: root/conf/unit/generate-unit-conf/service.inc
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-07-19 11:29:36 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-07-19 15:38:29 +0200
commit8c7132a146aa744f167ea2fc45dcd8d53018ecc0 (patch)
tree62bb28dc2831417d2406a30b4c8b38bd133b45bb /conf/unit/generate-unit-conf/service.inc
parentd8d819bcde18c8b4b5dfbdf610a6fc5e04fa54bf (diff)
Creates systemd service for APIs
Before this change, APIs were only provided as binder's exported websockets. This forbade ability to use symbolic links. Allowing links is interesting for having platform sockets and for linked api (not using socket). The API afm-main is a platform API. It must run at system level and must be available for all user clients. To achieve it, we use a link. Bug-AGL: SPEC-1592 Change-Id: I8753f83373755eb7fc2d2cc50251b8f738b61b03 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/unit/generate-unit-conf/service.inc')
-rw-r--r--conf/unit/generate-unit-conf/service.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/conf/unit/generate-unit-conf/service.inc b/conf/unit/generate-unit-conf/service.inc
index 88e4346..3efa975 100644
--- a/conf/unit/generate-unit-conf/service.inc
+++ b/conf/unit/generate-unit-conf/service.inc
@@ -42,14 +42,14 @@ ConditionSecurity=smack
# Automatic bound to required api
{{#required-api}}
{{#value=auto|ws}}
-BindsTo=UNIT_NAME_SOCKET_FOR({{name}})
-After=UNIT_NAME_SOCKET_FOR({{name}})
+BindsTo=UNIT_NAME_API_SERVICE({{name}},%i)
+After=UNIT_NAME_API_SERVICE({{name}},%i)
{{/value=auto|ws}}
{{/required-api}}
{{#provided-api}}
{{#value=ws|auto}}
-Requires=UNIT_NAME_SOCKET_FOR({{name}})
-After=UNIT_NAME_SOCKET_FOR({{name}})
+Requires=UNIT_NAME_API_SERVICE({{name}},%i)
+After=UNIT_NAME_API_SERVICE({{name}},%i)
{{/value=ws|auto}}
{{/provided-api}}