Skip to content

Commit f9d2f6e

Browse files
committed
Move check for git for ssh muxing into ghe-ssh
1 parent 4b7f71f commit f9d2f6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/ghe-backup

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ echo "$GHE_SNAPSHOT_TIMESTAMP $$" > ../in-progress
117117

118118
echo "Starting backup of $GHE_HOSTNAME in snapshot $GHE_SNAPSHOT_TIMESTAMP"
119119

120-
# Warn if git is not installed, and set GHE_DISABLE_SSH_MUX=true
121-
command -v git >/dev/null 2>&1 || echo "Warning: SSH multiplexing requires git but it's not installed." && export GHE_DISABLE_SSH_MUX=true
122-
123120
# Perform a host connection check and establish the remote appliance version.
124121
# The version is available in the GHE_REMOTE_VERSION variable and also written
125122
# to a version file in the snapshot directory itself.

share/github-backup-utils/ghe-ssh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ if echo "$*" | grep "[|;]" >/dev/null || [ $(echo "$*" | wc -l) -gt 1 ]; then
6262
exit 1
6363
fi
6464

65+
# Warn if git is not installed, and set GHE_DISABLE_SSH_MUX=true
66+
command -v git >/dev/null 2>&1 || echo "Warning: SSH multiplexing requires git but it's not installed." && export GHE_DISABLE_SSH_MUX=true
67+
6568
if [ -z "$GHE_DISABLE_SSH_MUX" ]; then
6669
controlpath="$TMPDIR/.ghe-sshmux-$(echo -n "$user@$host:$port" | git hash-object --stdin | cut -c 1-8)"
6770
opts="-o ControlMaster=auto -o ControlPath=\"$controlpath\" -o ControlPersist=10m -o ServerAliveInterval=10 $opts"

0 commit comments

Comments
 (0)