Add logic to the systemd unit template to add a dependency on the
weston@display.service if the widget has the display permission.
This fixes races with apps against weston / the new AGL compositor.
Bug-AGL: SPEC-3411
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ib89da253933e7e34cfe5dfeb668c8d9df63f0e51
After=Network.target
+IF_PERM(:public:display)
+BindsTo=weston@display.service
+After=weston@display.service
+ENDIF
+
# Adds check to smack
ConditionSecurity=smack
%nl