X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=conf%2Fafm-unit.conf;h=86ab626b8534b11142b1fe752a13ac71c3f72625;hb=cdd05aa3e66a876dba01f04173d817b9e5e039a0;hp=437d05366a8f87fb06f0c2fb75cba47ab85053c7;hpb=39d36dfadc1de6a2063e2928f8f8a00683b14a07;p=src%2Fapp-framework-main.git diff --git a/conf/afm-unit.conf b/conf/afm-unit.conf index 437d053..86ab626 100644 --- a/conf/afm-unit.conf +++ b/conf/afm-unit.conf @@ -45,6 +45,10 @@ ; ; gives the name and type of the unit ; +; - %systemd-unit wanted-by NAME +; +; tells to install a link to unit in the wants of NAME +; ;--------------------------------------------------------------------------------- {{#targets}} %begin systemd-unit @@ -77,6 +81,7 @@ After=afm-api-{{name}} [Service] SmackProcessLabel=User::App::{{id}} +SuccessExitStatus=0 SIGKILL {{#required-permission}} {{#urn:AGL:permission::platform:no-oom}} OOMScoreAdjust=-500 {{/urn:AGL:permission::platform:no-oom}} @@ -88,7 +93,8 @@ SmackProcessLabel=User::App::{{id}} %nl WorkingDirectory={{&#metadata.app-data-dir}} -SuccessExitStatus=0 SIGKILL +Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}} + ;--------------------------------------------------------------------------------- {{#content.type=text/html}} @@ -130,11 +136,22 @@ ExecStart=/usr/bin/afb-daemon --port={{:#metadata.http-port}} --random-token \ {{/content.type=text/html}} +;--------------------------------------------------------------------------------- +{{#content.type=application/x-executable}} + +%systemd-unit user +%systemd-unit service afm-appli-{{idaver}}{{^#target=main}}@{{:#target}}{{/#target=main}} +Environment=LD_LIBRARY_PATH=$ORIGIN/$LIB + +ExecStart={{:#metadata.install-dir}}/{{content.src}} + +{{/content.type=application/x-executable}} + ;--------------------------------------------------------------------------------- {{#content.type=application/vnd.agl.service}} %systemd-unit user -%systemd-unit service afm-api-{{:#target}} +%systemd-unit service afm-service-{{:#target}} ExecStart=/usr/bin/afb-daemon \ --rootdir={{:#metadata.install-dir}} \ @@ -155,8 +172,7 @@ ExecStart=/usr/bin/afb-daemon \ # auto generated by wgtpkg-unit for {{id}} version {{version}} target {{:#target}} # %systemd-unit user -%systemd-unit socket afm-api-{{:#target}} - +%systemd-unit socket afm-service-{{:#target}} [socket] SmackLabel=* @@ -171,9 +187,9 @@ FileDescriptorName={{:#target}} {{#required-permission.urn:AGL:permission::system:run-by-default}} [install] WantedBy=default.target +%systemd-unit wanted-by default.target {{/required-permission.urn:AGL:permission::system:run-by-default}} ;--------------------------------------------------------------------------------- %end systemd-unit {{/targets}} -