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

Side by Side Diff: remoting/host/installer/linux/debian/postinst

Issue 10860024: Handle updates to the wrapper script. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reinstated spin protection. Created 8 years, 4 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/bash 1 #!/bin/bash
2 2
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
5 # found in the LICENSE file.
6
3 set -e 7 set -e
4 8
5 case $1 in 9 LOGOUT_MSG="
10 Name: Please log out to update
11 Priority: Medium
12 OnlyAdminUsers: False
13 DontShowAfterReboot: true
14 DisplayIf: /usr/lib/chrome-remote-desktop/is_me2me_desktop
15 Description: Chrome Remote Desktop has been updated. Please save your work and l og out in order to apply this update. Your virtual desktop will be restarted aut omatically.
16 "
17
18 NOTIFIER_DIR="/var/lib/update-notifier/user.d"
19 VAR_DIR="/var/lib/chrome-remote-desktop"
20 HASHES_FILE="$VAR_DIR/hashes"
21
22 case "$1" in
6 "configure") 23 "configure")
24 # Kill me2me host processes. The wrapper script will restart them.
7 echo "Shutting down remoting hosts (they will restart automatically)..." 25 echo "Shutting down remoting hosts (they will restart automatically)..."
8 killall -q remoting_me2me_host || true 26 killall -q remoting_me2me_host || true
27 # If any files have changed that require the user to restart their virtual
28 # desktops (eg, the wrapper script itself) then notify them but don't do
29 # anything that would result in them losing state.
30 if [ -f "$HASHES_FILE" ]; then
31 if [ -d "$NOTIFIER_DIR" ]; then
32 if ! md5sum --status -c "$HASHES_FILE"; then
33 echo "Sending logout notification messages to virtual desktops."
34 echo "$LOGOUT_MSG" > "$NOTIFIER_DIR/chrome-remote-desktop-logout"
35 fi
36 fi
37 rm "$HASHES_FILE"
38 rmdir --ignore-fail-on-non-empty "$VAR_DIR"
39 fi
9 ;; 40 ;;
10 esac 41 esac
11 42
12 #DEBHELPER# 43 #DEBHELPER#
OLDNEW
« no previous file with comments | « remoting/host/installer/linux/debian/control ('k') | remoting/host/installer/linux/debian/preinst » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698