1 ;---------------------------------------------------------------------------------
2 ;---- M A I N P A R T O F T H E S E R V I C E ----
3 ;---------------------------------------------------------------------------------
6 # auto generated by wgtpkg-unit for {{:id}} version {{:version}} target {{:#target}} of {{:idaver}}
10 Description={{description}}
11 X-AFM-description={{description}}
12 X-AFM-name={{name.content}}
13 X-AFM-shortname={{name.short}}
15 # use X-AFM-id={{:id}}--{{:ver}}--{{:#target}}
18 # when home screen will use real ids
20 X-AFM-version={{:version}}
21 X-AFM-author={{author.content}}
22 X-AFM-author-email={{author.email}}
24 X-AFM-height={{height}}
26 X-AFM-icon={{:#metadata.install-dir}}/{{:src}}
29 X-AFM--target-name={{:#target}}
30 X-AFM--content={{content.src}}
31 X-AFM--type={{content.type}}
32 X-AFM--wgtdir={{:#metadata.install-dir}}
33 X-AFM--workdir=APP_DATA_DIR/{{:id}}
39 ConditionSecurity=smack
42 # Automatic bound to required api
45 BindsTo=UNIT_NAME_SOCKET_FOR({{name}})
46 After=UNIT_NAME_SOCKET_FOR({{name}})
52 EnvironmentFile=-AFM_CONFIG_DIR/unit.env.d/*
53 SmackProcessLabel=User::App::{{:id}}
54 SuccessExitStatus=0 SIGKILL
60 CapabilityBoundingSet=
63 ON_PERM(:platform:no-oom, OOMScoreAdjust=-500)
64 ON_PERM(:partner:real-time, IOSchedulingClass=realtime)
65 ON_PERM(:public:display, SupplementaryGroups=display)
66 ON_PERM(:public:syscall:clock, , SystemCallFilter=~@clock)
69 WorkingDirectory=-APP_DATA_DIR/{{:id}}
70 ExecStartPre=/bin/mkdir -p APP_DATA_DIR/{{:id}}
71 Environment=AFM_APP_INSTALL_DIR={{:#metadata.install-dir}}
72 Environment=PATH=/usr/sbin:/usr/bin:/sbin:/bin:{{:#metadata.install-dir}}
73 Environment=XDG_DATA_HOME=APP_DATA_DIR/{{:id}}
74 Environment=XDG_CONFIG_HOME=APP_DATA_DIR/{{:id}}
75 Environment=XDG_CACHE_HOME=APP_DATA_DIR/{{:id}}
76 Environment=XDG_RUNTIME_DIR=/run/user/%i
77 Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
78 Environment=LD_LIBRARY_PATH=$ORIGIN/lib
81 ; Needed to enable debug
82 Environment=AFM_ID=TARGET
83 EnvironmentFile=-/var/run/afm-debug/TARGET.env
87 %systemd-unit service UNIT_NAME_BASE
89 SyslogIdentifier=afbd-TARGET
91 StandardOutput=journal
94 ;---------------------------------------------------------------------------------
95 ;---- text/html application/vnd.agl.native application/vnd.agl.service ----
96 ;---------------------------------------------------------------------------------
97 {{#content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}}
99 {{/content.type=text/html|application/vnd.agl.native|application/vnd.agl.service}}
101 ;---------------------------------------------------------------------------------
102 ;---- application/x-executable ----
103 ;---------------------------------------------------------------------------------
104 {{#content.type=application/x-executable}}
105 ExecStart={{:#metadata.install-dir}}/{{content.src}}
106 {{/content.type=application/x-executable}}
108 IF_PERM(:system:run-by-default)
109 ;---------------------------------------------------------------------------------
111 ;---------------------------------------------------------------------------------
113 WantedBy=default.target
114 %systemd-unit wanted-by default.target