;
; Lines beginning with ; are firstly removed
;
-; 2. File instanciation
+; 2. File instantiation
;
; Mustache (extended) substitutions are applied using JSON
; data deduced from config.xml file of the widget.
;
; X-AFM-description={{description}}
;
-; Records the descritpion of the unit in the field "description"
+; Records the description of the unit in the field "description"
; of both the public and private object describing the unit.
;
; X-AFM--wgtdir={{:#metadata.install-dir}}
# Automatic bound to required api
{{#required-api}}
{{#value=auto|ws}}
-BindsTo=afm-api-ws-{{name}}
-After=afm-api-ws-{{name}}
+BindsTo=afm-api-ws-{{name}}.socket
+After=afm-api-ws-{{name}}.socket
{{/value=auto|ws}}
{{/required-api}}
%nl
WorkingDirectory=-{{&#metadata.app-data-dir}}/{{id}}
ExecStartPre=/bin/mkdir -p {{&#metadata.app-data-dir}}/{{id}}
Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
+Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}
%systemd-unit user
{{#required-permission.urn:AGL:permission::public:hidden}}\
; auto start
;---------------------------------------------------------------------------------
{{#required-permission.urn:AGL:permission::system:run-by-default}}
-{{^provided-api}}
%nl
[Install]
WantedBy=default.target
%systemd-unit wanted-by default.target
-{{/provided-api}}
{{/required-permission.urn:AGL:permission::system:run-by-default}}
%end systemd-unit