Add SSH port variable
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
options="$1"
|
||||
ssh_port="$2"
|
||||
SSH_HOME="${HOME}/.ssh"
|
||||
SSH_KEYPATH="${SSH_HOME}/deploy_key"
|
||||
|
||||
@@ -12,5 +13,5 @@ chmod 600 "$SSH_KEYPATH"
|
||||
|
||||
echo "Deploying..."
|
||||
rsync $options \
|
||||
-e "ssh -i $SSH_KEYPATH -o StrictHostKeyChecking=no" \
|
||||
-e "ssh -p $ssh_port -i $SSH_KEYPATH -o StrictHostKeyChecking=no" \
|
||||
"$RSYNC_SOURCE" "$RSYNC_USERHOST":"$RSYNC_DESTINATION"
|
||||
|
||||
Reference in New Issue
Block a user