aboutsummaryrefslogtreecommitdiffstats
path: root/conf/unit/afm-unit.conf.in
diff options
context:
space:
mode:
Diffstat (limited to 'conf/unit/afm-unit.conf.in')
-rw-r--r--conf/unit/afm-unit.conf.in36
1 files changed, 33 insertions, 3 deletions
diff --git a/conf/unit/afm-unit.conf.in b/conf/unit/afm-unit.conf.in
index 0cbe103..74c57ea 100644
--- a/conf/unit/afm-unit.conf.in
+++ b/conf/unit/afm-unit.conf.in
@@ -111,6 +111,12 @@ After=user@%i.service
ConditionSecurity=smack
%nl
# Automatic bound to required api
+{{#required-binding}}
+{{#value=extern}}
+BindsTo=afm-link-{{name}}@%i.service
+After=afm-link-{{name}}@%i.service
+{{/value=extern}}
+{{/required-binding}}
{{#required-api}}
{{#value=auto|ws}}
BindsTo=afm-api-{{name}}@%i.service
@@ -119,8 +125,8 @@ After=afm-api-{{name}}@%i.service
{{/required-api}}
{{#provided-api}}
{{#value=ws|auto}}
-Requires=afm-api-{{name}}@%i.service
-After=afm-api-{{name}}@%i.service
+Requires=afm-api-{{name}}@%i.socket
+After=afm-api-{{name}}@%i.socket
{{/value=ws|auto}}
{{/provided-api}}
%nl
@@ -174,10 +180,13 @@ ExecStart=/usr/bin/afb-daemon \
{{#required-api}} \
{{#value=auto|ws}}--ws-client=unix:@afm_users_rundir@/%i/apis/ws/{{name}}{{/value=auto|ws}} \
{{#value=dbus}}--dbus-client={{name}}{{/value=dbus}} \
- {{#value=link}}--binding=@afm_users_rundir@/%i/apis/lib/{{name}}{{/value=link}} \
{{#value=cloud}}--cloud-client={{name}}{{/value=cloud}} \
{{#value=local}}--binding={{:#metadata.install-dir}}/{{name}}{{/value=local}} \
{{/required-api}} \
+ {{#required-binding}} \
+ {{#value=local}}--binding={{:#metadata.install-dir}}/{{name}}{{/value=local}} \
+ {{#value=extern}}--binding=@afm_users_rundir@/%i/apis/link/{{name}}{{/value=extern}} \
+ {{/required-binding}} \
{{#provided-api}} \
{{#value=auto|ws}}--ws-server=sd:{{name}}{{/value=auto|ws}} \
{{#value=dbus}}--dbus-server={{name}}{{/value=dbus}} \
@@ -250,6 +259,27 @@ Service=afm-{{#required-permission.urn:AGL:permission::public:hidden}}service{{/
%end systemd-unit
{{/value=ws|auto}}
{{/provided-api}}
+;-------------------------------------------------------------------------------
+;---- P R O V I D E D B I N D I N G ----
+;-------------------------------------------------------------------------------
+{{#provided-binding}}
+;-------------------------------------------------------------------------------
+;---- T H E S E R V I C E O F T H E B I N D I N G ----
+;-------------------------------------------------------------------------------
+%begin systemd-unit
+# auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
+%systemd-unit system
+%systemd-unit service afm-link-{{name}}@
+[Unit]
+Description=Provides binding {{name}} for user %i
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/ln -s {{:#metadata.install-dir}}/{{value}} @afm_users_rundir@/%i/apis/link/{{name}}
+%end systemd-unit
+{{/provided-binding}}
{{/targets}}
;---------------------------------------------------------------------------------
; End of file afm-unit.conf mode RELEASE