summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2016-09-05 12:48:28 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2016-09-05 12:48:28 +0200
commit516dc3e9f73def9bf865f99fdc25333ce9c85ff3 (patch)
treecac193f3a66d4097d505600fdeac14c81169a3c1
parenta6a2105717a9f27799f9f3de429e4bd9da82c6cc (diff)
Systemd services: add pre-start to check if unity can run in this environment
(bzr r4153.9.57)
-rw-r--r--data/unity7.service.in3
-rw-r--r--services/unity-panel-service-lockscreen.service.in5
-rw-r--r--services/unity-panel-service.service.in3
3 files changed, 5 insertions, 6 deletions
diff --git a/data/unity7.service.in b/data/unity7.service.in
index 078cf4fe4..36dc2aa6a 100644
--- a/data/unity7.service.in
+++ b/data/unity7.service.in
@@ -6,8 +6,9 @@ After=unity-settings-daemon.service
PartOf=graphical-session.target
[Service]
+ExecStartPre=@UNITY_LIBDIR@/systemd-prestart-check
+ExecStartPre=@UNITY_LIBDIR@/compiz-profile-selector
ExecStart=/usr/bin/compiz
-ExecStartPre=@UNITY_LIBDIR@/unity-compiz-profile-select
Restart=on-failure
[Install]
diff --git a/services/unity-panel-service-lockscreen.service.in b/services/unity-panel-service-lockscreen.service.in
index e52237c70..d2398e03a 100644
--- a/services/unity-panel-service-lockscreen.service.in
+++ b/services/unity-panel-service-lockscreen.service.in
@@ -3,9 +3,6 @@ Description=Backing Service for the Unity Panel in Lockscreen mode
PartOf=unity-screen-locked.target
[Service]
-ExecStartPre=/bin/sh -ec '\
- status=$(initctl status unity7) || true; \
- echo "$status" | grep -vq "start/running" || \
- (ret=$?; echo "Unity is managed by Upstart"; exit $ret)'
+ExecStartPre=@UNITY_LIBDIR@/systemd-prestart-check
ExecStart=@UNITY_LIBDIR@/unity-panel-service --lockscreen-mode
Restart=on-failure
diff --git a/services/unity-panel-service.service.in b/services/unity-panel-service.service.in
index 806914ad4..631b451ed 100644
--- a/services/unity-panel-service.service.in
+++ b/services/unity-panel-service.service.in
@@ -1,9 +1,10 @@
[Unit]
Description=Backing Service for the Unity Panel
-After=unity7.service
+Before=unity7.service
PartOf=graphical-session.target
BindsTo=indicators-pre.target
[Service]
+ExecStartPre=@UNITY_LIBDIR@/systemd-prestart-check
ExecStart=@UNITY_LIBDIR@/unity-panel-service
Restart=on-failure