diff options
Diffstat (limited to 'tools/upstart-prestart-check')
| -rw-r--r-- | tools/upstart-prestart-check | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/upstart-prestart-check b/tools/upstart-prestart-check new file mode 100644 index 000000000..e846c4769 --- /dev/null +++ b/tools/upstart-prestart-check @@ -0,0 +1,17 @@ +#!/bin/bash + +# If gnome-session is going to start compiz, +# we don't want to be the ones doing it. +if grep -q compiz /usr/share/gnome-session/sessions/ubuntu.session ; then + echo "GNOME Session is starting Compiz" + stop + exit 1 +fi + +if (systemctl --user is-active unity7 &> /dev/null); then + echo "Unity instance is managed by Systemd, ignoring request..." + stop + exit 1 +fi + +exit 0 |
