-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4231 from rmol/fix-4221
Try harder to attach to an existing tmux session
- Loading branch information
Showing
9 changed files
with
77 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
install_files/ansible-base/roles/common/files/bashrc_securedrop_additions
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ Priority: optional | |
Maintainer: SecureDrop Team <[email protected]> | ||
Homepage: https://securedrop.org | ||
Package: securedrop-config | ||
Version: 0.1.2+0.13.0~rc1 | ||
Version: 0.1.3+0.13.0~rc1 | ||
Architecture: all | ||
Description: Establishes baseline system state for running SecureDrop. | ||
Configures apt repositories. |
22 changes: 22 additions & 0 deletions
22
install_files/securedrop-config/etc/profile.d/securedrop_additions.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[[ $- != *i* ]] && return | ||
|
||
which tmux >/dev/null 2>&1 || return | ||
|
||
tmux_attach_via_proc() { | ||
# If the tmux package is upgraded during the lifetime of a | ||
# session, attaching with the new binary can fail due to different | ||
# protocol versions. This function attaches using the reference to | ||
# the old executable found in the /proc tree of an existing | ||
# session. | ||
pid=$(pgrep --newest tmux) | ||
if test -n "$pid" | ||
then | ||
/proc/$pid/exe attach | ||
fi | ||
return 1 | ||
} | ||
|
||
if test -z "$TMUX" | ||
then | ||
(tmux attach || tmux_attach_via_proc || tmux new-session) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters