Change-Id: I493c49a80ebb1fa85f586d0b0704b5682f0c3613
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
After=afm-api-ws-{{name}}@%i.socket
{{/value=auto|ws}}
{{/required-api}}
After=afm-api-ws-{{name}}@%i.socket
{{/value=auto|ws}}
{{/required-api}}
+{{#provided-api}}
+{{#value=ws|auto}}
+Requires=afm-api-ws-{{name}}@%i.socket
+After=afm-api-ws-{{name}}@%i.socket
+{{/value=ws|auto}}
+{{/provided-api}}
%nl
[Service]
EnvironmentFile=-@afm_confdir@/unit.env.d/*
%nl
[Service]
EnvironmentFile=-@afm_confdir@/unit.env.d/*
Description=Provides api {{name}} for user %i
Requires=afm-user-setup@%i.service
After=afm-user-setup@%i.service
Description=Provides api {{name}} for user %i
Requires=afm-user-setup@%i.service
After=afm-user-setup@%i.service
[Socket]
SmackLabel=*
ListenStream=/run/user/%i/apis/ws/{{name}}
[Socket]
SmackLabel=*
ListenStream=/run/user/%i/apis/ws/{{name}}
After=afm-api-ws-{{name}}@%i.socket
{{/value=auto|ws}}
{{/required-api}}
After=afm-api-ws-{{name}}@%i.socket
{{/value=auto|ws}}
{{/required-api}}
+{{#provided-api}}
+{{#value=ws|auto}}
+Requires=afm-api-ws-{{name}}@%i.socket
+After=afm-api-ws-{{name}}@%i.socket
+{{/value=ws|auto}}
+{{/provided-api}}
%nl
[Service]
EnvironmentFile=-@afm_confdir@/unit.env.d/*
%nl
[Service]
EnvironmentFile=-@afm_confdir@/unit.env.d/*
Description=Provides api {{name}} for user %i
Requires=afm-user-setup@%i.service
After=afm-user-setup@%i.service
Description=Provides api {{name}} for user %i
Requires=afm-user-setup@%i.service
After=afm-user-setup@%i.service
[Socket]
SmackLabel=*
ListenStream=/run/user/%i/apis/ws/{{name}}
[Socket]
SmackLabel=*
ListenStream=/run/user/%i/apis/ws/{{name}}
Description=Provides api {{name}} for user %i
Requires=afm-user-setup@%i.service
After=afm-user-setup@%i.service
Description=Provides api {{name}} for user %i
Requires=afm-user-setup@%i.service
After=afm-user-setup@%i.service
After=UNIT_NAME_SOCKET_FOR({{name}})
{{/value=auto|ws}}
{{/required-api}}
After=UNIT_NAME_SOCKET_FOR({{name}})
{{/value=auto|ws}}
{{/required-api}}
+{{#provided-api}}
+{{#value=ws|auto}}
+Requires=UNIT_NAME_SOCKET_FOR({{name}})
+After=UNIT_NAME_SOCKET_FOR({{name}})
+{{/value=ws|auto}}
+{{/provided-api}}
+