OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 HELPERTOOLS=/Library/PrivilegedHelperTools | 7 HELPERTOOLS=/Library/PrivilegedHelperTools |
8 NAME=org.chromium.chromoting | 8 NAME=org.chromium.chromoting |
9 CONFIG_FILE="$HELPERTOOLS/$NAME.json" | 9 CONFIG_FILE="$HELPERTOOLS/$NAME.json" |
10 PLIST=/Library/LaunchAgents/org.chromium.chromoting.plist | 10 PLIST=/Library/LaunchAgents/org.chromium.chromoting.plist |
11 ENABLED_FILE="$HELPERTOOLS/$NAME.me2me_enabled" | 11 ENABLED_FILE="$HELPERTOOLS/$NAME.me2me_enabled" |
12 ENABLED_FILE_BACKUP="$ENABLED_FILE.backup" | 12 ENABLED_FILE_BACKUP="$ENABLED_FILE.backup" |
13 | 13 |
14 KSADMIN=/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Content
s/MacOS/ksadmin | 14 KSADMIN=/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Content
s/MacOS/ksadmin |
15 KSUPDATE=https://tools.google.com/service/update2 | 15 KSUPDATE=https://tools.google.com/service/update2 |
16 KSPID=com.google.chrome_remote_desktop | 16 KSPID=com.google.chrome_remote_desktop |
17 KSPVERSION=@@VERSION_FULL@@ | 17 KSPVERSION=@@VERSION@@ |
18 | 18 |
19 trap onexit ERR | 19 trap onexit ERR |
20 | 20 |
21 function onexit { | 21 function onexit { |
22 # Log an error but don't report an install failure if this script has errors. | 22 # Log an error but don't report an install failure if this script has errors. |
23 logger An error occurred while launching the service | 23 logger An error occurred while launching the service |
24 exit 0 | 24 exit 0 |
25 } | 25 } |
26 | 26 |
27 # Create auth file (with correct owner and permissions) if it doesn't already | 27 # Create auth file (with correct owner and permissions) if it doesn't already |
(...skipping 20 matching lines...) Expand all Loading... |
48 # user (using launchctl bsexec). | 48 # user (using launchctl bsexec). |
49 set `ps aux | grep loginwindow.app | grep -v grep` | 49 set `ps aux | grep loginwindow.app | grep -v grep` |
50 USERNAME=$1 | 50 USERNAME=$1 |
51 USERID=$2 | 51 USERID=$2 |
52 if [[ -n "$USERNAME" && -n "$USERID" ]]; then | 52 if [[ -n "$USERNAME" && -n "$USERID" ]]; then |
53 launchctl bsexec "$USERID" sudo -u "$USERNAME" launchctl load -w -S Aqua "$PLI
ST" | 53 launchctl bsexec "$USERID" sudo -u "$USERNAME" launchctl load -w -S Aqua "$PLI
ST" |
54 fi | 54 fi |
55 | 55 |
56 # Register a ticket with Keystone so we're updated. | 56 # Register a ticket with Keystone so we're updated. |
57 $KSADMIN --register --productid "$KSPID" --version "$KSPVERSION" --xcpath "$PLIS
T" --url "$KSUPDATE" | 57 $KSADMIN --register --productid "$KSPID" --version "$KSPVERSION" --xcpath "$PLIS
T" --url "$KSUPDATE" |
OLD | NEW |