1 dnl vim: set filetype=sysctl.conf.m4 syntax=sysctl.conf.m4:
2 ;-------------------------------------------------------------------------------
3 ;---- M A I N P A R T O F T H E S E R V I C E ----
4 ;-------------------------------------------------------------------------------
7 # auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
11 IF_PERM(:partner:scope-platform)
12 %systemd-unit service UNIT_NAME_BASE
14 %systemd-unit service UNIT_NAME_BASE@
18 Description={{description}}
19 X-AFM-description={{description}}
20 X-AFM-name={{name.content}}
21 X-AFM-shortname={{name.short}}
23 X-AFM-version={{:version}}
24 X-AFM-author={{author.content}}
25 X-AFM-author-email={{author.email}}
27 X-AFM-height={{height}}
29 X-AFM-icon={{:#metadata.install-dir}}/{{:src}}
32 X-AFM--target-name={{:#target}}
33 X-AFM--content={{content.src}}
34 X-AFM--type={{content.type}}
35 X-AFM--wgtdir={{:#metadata.install-dir}}
36 X-AFM--workdir=APP_WORK_DIR
37 X-AFM--visibility=ON_PERM(`:public:hidden', `hidden', `visible')
40 IF_PERM(:partner:scope-platform)
42 After=afm-system-setup.service
45 Requires=afm-user-session@%i.target
52 ConditionSecurity=smack
55 # Automatic bound to required api
58 Requires=UNIT_NAME_BINDING_SERVICE({{name}})
59 After=UNIT_NAME_BINDING_SERVICE({{name}})
65 Requires=UNIT_NAME_API_SERVICE({{name}})
66 After=UNIT_NAME_API_SERVICE({{name}})
72 Requires=UNIT_NAME_API_SOCKET({{name}})
73 After=UNIT_NAME_API_SOCKET({{name}})
81 EnvironmentFile=-@afm_confdir@/unit.env.d/*
82 EnvironmentFile=-@afm_confdir@/widget.env.d/{{:id}}/*
83 SmackProcessLabel=SMACKLABEL
84 SuccessExitStatus=0 SIGKILL
87 IF_PERM(:partner:scope-platform)
95 WorkingDirectory=-APP_WORK_DIR
96 ExecStartPre=/bin/mkdir -p APP_WORK_DIR
97 Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=USER_RUN_DIR/bus
99 IF_PERM(:system:capability:keep-all)
100 CapabilityBoundingSet=~
101 AmbientCapabilities=~
103 CapabilityBoundingSet=
106 ON_PERM(:platform:no-oom, OOMScoreAdjust=-500)
107 ON_PERM(:partner:real-time, IOSchedulingClass=realtime)
108 ON_PERM(:public:display, SupplementaryGroups=display)
109 ON_PERM(:public:audio, SupplementaryGroups=audio)
110 ON_NOT_PERM(:public:syscall:clock, SystemCallFilter=~@clock)
113 Environment=AFM_ID=TARGET
114 Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
115 Environment=AFM_WORKDIR=APP_WORK_DIR
116 Environment=AFM_WSAPI_DIR=API_PATH_WS
117 Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}/bin
118 Environment=LD_LIBRARY_PATH={{:#metadata.install-dir}}/lib
119 Environment=XDG_DATA_HOME=APP_WORK_DIR
120 Environment=XDG_CONFIG_HOME=APP_WORK_DIR
121 Environment=XDG_CACHE_HOME=APP_WORK_DIR
122 Environment=XDG_RUNTIME_DIR=RUN_DIR
123 ON_CONTENT(text/html, Environment=WAIT_FOR_HOST_SERVICE="1")
126 ; Needed to enable debug
127 EnvironmentFile=-DEBUGGING_DIR/TARGET.env
130 SyslogIdentifier=afbd-TARGET
132 StandardOutput=journal
133 StandardError=journal
135 ;-------------------------------------------------------------------------------
136 ;---- text/html application/vnd.agl.native application/vnd.agl.service ----
137 ;-------------------------------------------------------------------------------
138 {{#content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}}
140 {{/content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}}
142 ;-------------------------------------------------------------------------------
143 ;---- application/x-executable ----
144 ;-------------------------------------------------------------------------------
145 {{#content.type=application/x-executable}}
146 ExecStart={{:#metadata.install-dir}}/{{content.src}}
147 {{/content.type=application/x-executable}}
149 ;-------------------------------------------------------------------------------
150 ;---- application/vnd.agl.resource ----
151 ;-------------------------------------------------------------------------------
152 {{#content.type=application/vnd.agl.resource}}
155 {{/content.type=application/vnd.agl.resource}}
157 IF_PERM(:system:run-by-default)
158 ;-------------------------------------------------------------------------------
160 ;-------------------------------------------------------------------------------
162 IF_PERM(:partner:scope-platform)
163 WantedBy=multi-user.target
164 %systemd-unit wanted-by multi-user.target
166 WantedBy=afm-user-session@.target
167 %systemd-unit wanted-by afm-user-session@.target