~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to utopic/usr/share/upstart/sessions/unity-greeter-session-broadcast-session.conf

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
description "Unity Greeter Session Broadcast Session Component"
2
 
author "Ted Gould <ted@canonical.com>"
3
 
 
4
 
task
5
 
 
6
 
#TODO: Check GSettings Key
7
 
start on dbus BUS=system SIGNAL="StartUrl" INTERFACE="com.canonical.Unity.Greeter.Broadcast" OBJPATH="/com/canonical/Unity/Greeter/Broadcast"
8
 
 
9
 
pre-start script
10
 
        if [ -z $ARG0 ] ; then
11
 
                stop
12
 
                exit 1
13
 
        fi
14
 
        if [ $ARG0 != $USER ] ; then
15
 
                stop
16
 
                exit 1
17
 
        fi
18
 
 
19
 
        OWNER=`gdbus call --system --dest org.freedesktop.DBus --object-path / --method org.freedesktop.DBus.GetNameOwner com.canonical.Unity.Greeter.Broadcast | cut -d "'" -f 2`
20
 
 
21
 
        if [ -z $OWNER ] ; then
22
 
                stop
23
 
                exit 1
24
 
        fi
25
 
        if [ $OWNER != $SENDER ] ; then
26
 
                stop
27
 
                exit 1
28
 
        fi
29
 
end script
30
 
 
31
 
exec url-dispatcher ${ARG1}