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.
10 Name: Please log out to update
13 DontShowAfterReboot: true
14 DisplayIf: /opt/google/chrome-remote-desktop/is-remoting-session
15 Description: Chrome Remote Desktop has been updated. Please save your work and log out in order to apply this update. Your virtual desktop will be restarted automatically.
18 NOTIFIER_DIR="/var/lib/update-notifier/user.d"
19 VAR_DIR="/var/lib/chrome-remote-desktop"
20 HASHES_FILE="$VAR_DIR/hashes"
24 # Kill host processes. The wrapper script will restart them.
25 echo "Shutting down Chrome Remote Desktop hosts (they will restart automatically)..."
26 killall -q chrome-remote-desktop-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" 2>/dev/null; then
33 echo "Sending logout notification messages to virtual desktops."
34 echo "$LOGOUT_MSG" > "$NOTIFIER_DIR/chrome-remote-desktop-logout"
38 rmdir --ignore-fail-on-non-empty "$VAR_DIR"