Set explicit path for services and units
[src/app-framework-main.git] / conf / afm-unit.conf.in
index e5189fb..e6163e2 100644 (file)
@@ -13,7 +13,7 @@
 ;
 ;           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.
@@ -62,7 +62,7 @@
 ;
 ;        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}}
@@ -109,8 +109,8 @@ ConditionSecurity=smack
 # 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
@@ -132,6 +132,7 @@ SuccessExitStatus=0 SIGKILL
 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}}\
@@ -231,12 +232,10 @@ ExecStart={{:#metadata.install-dir}}/{{content.src}}
 ; 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