Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: remoting/host/installer/mac/Scripts/remoting_postflight.sh

Issue 10429010: [Chromoting] Add version stamps to Mac installer and host scripts. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 # Version = @@VERSION@@
8
7 HELPERTOOLS=/Library/PrivilegedHelperTools 9 HELPERTOOLS=/Library/PrivilegedHelperTools
8 NAME=org.chromium.chromoting 10 NAME=org.chromium.chromoting
9 CONFIG_FILE="$HELPERTOOLS/$NAME.json" 11 CONFIG_FILE="$HELPERTOOLS/$NAME.json"
10 PLIST=/Library/LaunchAgents/org.chromium.chromoting.plist 12 PLIST=/Library/LaunchAgents/org.chromium.chromoting.plist
11 ENABLED_FILE="$HELPERTOOLS/$NAME.me2me_enabled" 13 ENABLED_FILE="$HELPERTOOLS/$NAME.me2me_enabled"
12 ENABLED_FILE_BACKUP="$ENABLED_FILE.backup" 14 ENABLED_FILE_BACKUP="$ENABLED_FILE.backup"
13 15
14 KSADMIN=/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Content s/MacOS/ksadmin 16 KSADMIN=/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Content s/MacOS/ksadmin
15 KSUPDATE=https://tools.google.com/service/update2 17 KSUPDATE=https://tools.google.com/service/update2
16 KSPID=com.google.chrome_remote_desktop 18 KSPID=com.google.chrome_remote_desktop
17 KSPVERSION=@@VERSION@@ 19 KSPVERSION=@@VERSION@@
18 20
19 trap onexit ERR 21 trap onexit ERR
20 22
21 function onexit { 23 function onexit {
22 # Log an error but don't report an install failure if this script has errors. 24 # Log an error but don't report an install failure if this script has errors.
23 logger An error occurred while launching the service 25 logger An error occurred while launching the service
24 exit 0 26 exit 0
25 } 27 }
26 28
29 logger Running Chrome Remote Desktop postflight script @@VERSION@@
30
27 # Create auth file (with correct owner and permissions) if it doesn't already 31 # Create auth file (with correct owner and permissions) if it doesn't already
28 # exist. 32 # exist.
29 if [[ ! -f "$CONFIG_FILE" ]]; then 33 if [[ ! -f "$CONFIG_FILE" ]]; then
30 touch "$CONFIG_FILE" 34 touch "$CONFIG_FILE"
31 chmod 600 "$CONFIG_FILE" 35 chmod 600 "$CONFIG_FILE"
32 chmod +a "$USER:allow:read" "$CONFIG_FILE" 36 chmod +a "$USER:allow:read" "$CONFIG_FILE"
33 fi 37 fi
34 38
35 # If there is a backup _enabled file, re-enable the service. 39 # If there is a backup _enabled file, re-enable the service.
36 if [[ -f "$ENABLED_FILE_BACKUP" ]]; then 40 if [[ -f "$ENABLED_FILE_BACKUP" ]]; then
(...skipping 11 matching lines...) Expand all
48 # user (using launchctl bsexec). 52 # user (using launchctl bsexec).
49 set `ps aux | grep loginwindow.app | grep -v grep` 53 set `ps aux | grep loginwindow.app | grep -v grep`
50 USERNAME=$1 54 USERNAME=$1
51 USERID=$2 55 USERID=$2
52 if [[ -n "$USERNAME" && -n "$USERID" ]]; then 56 if [[ -n "$USERNAME" && -n "$USERID" ]]; then
53 launchctl bsexec "$USERID" sudo -u "$USERNAME" launchctl load -w -S Aqua "$PLI ST" 57 launchctl bsexec "$USERID" sudo -u "$USERNAME" launchctl load -w -S Aqua "$PLI ST"
54 fi 58 fi
55 59
56 # Register a ticket with Keystone so we're updated. 60 # Register a ticket with Keystone so we're updated.
57 $KSADMIN --register --productid "$KSPID" --version "$KSPVERSION" --xcpath "$PLIS T" --url "$KSUPDATE" 61 $KSADMIN --register --productid "$KSPID" --version "$KSPVERSION" --xcpath "$PLIS T" --url "$KSUPDATE"
OLDNEW
« no previous file with comments | « remoting/host/installer/mac/Scripts/keystone_install.sh ('k') | remoting/host/installer/mac/Scripts/remoting_preflight.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698