~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to vivid/etc/init/ubuntu-location-provider-here-posclientd.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 "Nokia Here positioning services"
 
2
 
 
3
# this requires DBus and is useless without slpgwd; should cope with DBus
 
4
# services restarting though
 
5
start on started dbus and started ubuntu-location-provider-here-slpgwd
 
6
stop on stopping dbus
 
7
 
 
8
respawn
 
9
 
 
10
console log
 
11
 
 
12
env BASE="/custom/vendor/here/location-provider"
 
13
env STORAGE="/userdata/system-data/var/lib/ubuntu-location-provider-here"
 
14
 
 
15
pre-start script
 
16
    if ! [ -x "$BASE/bin/i386-linux-gnu/posclientd" ]; then
 
17
        echo "HERE binaries not found; disabling" >&2
 
18
        stop
 
19
    fi
 
20
 
 
21
    # XXX need to move to session bus to avoid hardcoding this ~phablet test
 
22
    if ! herepositioning-license-accepted; then
 
23
        echo "HERE license not accepted; disabling" >&2
 
24
        stop
 
25
    fi
 
26
end script
 
27
 
 
28
script
 
29
    . /usr/share/ubuntu-location-provider-here/functions
 
30
    # set the env variables
 
31
    if [ "$(getprop custom.location.report_imei)" = "true" ]; then
 
32
        setup_here_ofono_env
 
33
    else
 
34
        here_dummy_ofono_env
 
35
    fi
 
36
    setup_here_props
 
37
    setup_here_device_id
 
38
 
 
39
    mkdir -p "$STORAGE"
 
40
 
 
41
    LD_LIBRARY_PATH="$BASE/lib/i386-linux-gnu"
 
42
    export LD_LIBRARY_PATH
 
43
    exec "$BASE/bin/i386-linux-gnu/posclientd" \
 
44
        --preinst-dir "$BASE/share" --storage-dir "$STORAGE"
 
45
end script