| 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 # Version = @@VERSION@@ | 7 # Version = @@VERSION@@ |
| 8 | 8 |
| 9 NAME=org.chromium.chromoting | 9 NAME=org.chromium.chromoting |
| 10 CONFIG_DIR=/Library/PrivilegedHelperTools | 10 CONFIG_DIR=/Library/PrivilegedHelperTools |
| 11 HOST_EXE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/MacOS/remoting_me2me_host | 11 HOST_EXE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/MacOS/remoting_me2me_host |
| 12 PLIST_FILE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/Info.plist | 12 PLIST_FILE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/Info.plist |
| 13 ENABLED_FILE=$CONFIG_DIR/$NAME.me2me_enabled | 13 ENABLED_FILE=$CONFIG_DIR/$NAME.me2me_enabled |
| 14 CONFIG_FILE=$CONFIG_DIR/$NAME.json | 14 CONFIG_FILE=$CONFIG_DIR/$NAME.json |
| 15 PREF_PANE_BUNDLE=/Library/PreferencePanes/$NAME.prefPane | 15 PREF_PANE_BUNDLE=/Library/PreferencePanes/$NAME.prefPane |
| 16 | 16 |
| 17 # The exit code returned by 'wait' when a process is terminated by SIGTERM. | 17 # The exit code returned by 'wait' when a process is terminated by SIGTERM. |
| 18 SIGTERM_EXIT_CODE=143 | 18 SIGTERM_EXIT_CODE=143 |
| 19 | 19 |
| 20 # Range of exit codes returned by the host to indicate that a permanent error | 20 # Range of exit codes returned by the host to indicate that a permanent error |
| 21 # has occurred and that the host should not be restarted. Please, keep these | 21 # has occurred and that the host should not be restarted. Please, keep these |
| 22 # constants in sync with remoting/host/host_exit_codes.h. | 22 # constants in sync with remoting/host/constants.h. |
| 23 MIN_PERMANENT_ERROR_EXIT_CODE=2 | 23 MIN_PERMANENT_ERROR_EXIT_CODE=2 |
| 24 MAX_PERMANENT_ERROR_EXIT_CODE=6 | 24 MAX_PERMANENT_ERROR_EXIT_CODE=6 |
| 25 | 25 |
| 26 HOST_PID=0 | 26 HOST_PID=0 |
| 27 SIGNAL_WAS_TRAPPED=0 | 27 SIGNAL_WAS_TRAPPED=0 |
| 28 | 28 |
| 29 handle_signal() { | 29 handle_signal() { |
| 30 SIGNAL_WAS_TRAPPED=1 | 30 SIGNAL_WAS_TRAPPED=1 |
| 31 } | 31 } |
| 32 | 32 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 # Wait for the parent (System Preferences applet) to die, by reading from | 92 # Wait for the parent (System Preferences applet) to die, by reading from |
| 93 # stdin until the pipe is broken. | 93 # stdin until the pipe is broken. |
| 94 cat 2>/dev/null || true | 94 cat 2>/dev/null || true |
| 95 open "$PREF_PANE_BUNDLE" | 95 open "$PREF_PANE_BUNDLE" |
| 96 elif [[ "$1" = "--run-from-launchd" ]]; then | 96 elif [[ "$1" = "--run-from-launchd" ]]; then |
| 97 run_host | 97 run_host |
| 98 else | 98 else |
| 99 echo $$ | 99 echo $$ |
| 100 exit 1 | 100 exit 1 |
| 101 fi | 101 fi |
| OLD | NEW |