aboutsummaryrefslogtreecommitdiffstats
path: root/conf/system/afm-api-afm-main@.service.in
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/system/afm-api-afm-main@.service.in
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/system/afm-api-afm-main@.service.in')
-rw-r--r--conf/system/afm-api-afm-main@.service.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/conf/system/afm-api-afm-main@.service.in b/conf/system/afm-api-afm-main@.service.in
new file mode 100644
index 0000000..f5b2519
--- /dev/null
+++ b/conf/system/afm-api-afm-main@.service.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=Provides api afm-main for user %i
+X-AFM-API-TYPE=ws
+
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+Requires=afm-system-daemon.socket
+After=afm-system-daemon.socket
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/ln -s @afm_platform_rundir@/apis/ws/afm-main /run/user/%i/apis/ws/afm-main