+X-AFM-API-TYPE={{value}}
+
+Requires=afm-user-setup@%i.service
+After=afm-user-setup@%i.service
+
+{{#value=ws|auto}}
+Requires=UNIT_NAME_API_BASE({{name}})@%i.socket
+After=UNIT_NAME_API_BASE({{name}})@%i.socket
+{{/value=ws|auto}}
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+{{#value=ws|auto}}
+ExecStart=/bin/true
+{{/value=ws|auto}}
+dnl {{#value=link}}
+dnl ExecStart=/bin/ln -s {{:#metadata.install-dir}}/ USER_RUN_DIR/apis/link/{{name}}
+dnl {{/value=link}}
+
+dnl %nl
+dnl [Install]
+dnl WantedBy=afm-user-session@.target
+dnl %systemd-unit wanted-by afm-user-session@.target
+
+%end systemd-unit
+
+
+;-------------------------------------------------------------------------------
+;---- T H E S O C K E T O F T H E A P I ----
+;-------------------------------------------------------------------------------
+{{#value=ws|auto}}
+
+%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