This commit is contained in:
2026-03-24 01:37:47 +00:00
parent 221aa3d1ef
commit 85a680602d
+8 -5
View File
@@ -17,10 +17,9 @@
#-----------------------------------------------------------------------------------------------
#-------------------- Host Configuration --------------------
# Hostnames of both servers
# Define the hostnames of both servers
HOST1="unRAID-Gmer4Lfe"
HOST2="unRAID-Jayred365"
# Detect local hostname
LOCAL_HOSTNAME="$(hostname)"
if [[ "$LOCAL_HOSTNAME" == "$HOST1" ]]; then
@@ -36,8 +35,9 @@ fi
echo "Local server: $LOCAL_SERVER_NAME"
echo "Remote server: $REMOTE_SERVER_NAME"
# Remote Server Ip Resolution
#-----------------------------------------------------------------------------------------------
#--------------------------- Remote Server Ip Resolution ----------------------------------------
#-----------------------------------------------------------------------------------------------
# Resolve Tailscale IP dynamically
REMOTE_SERVER=$(tailscale ip -4 "$REMOTE_SERVER_NAME" 2>/dev/null)
if [[ -z "$REMOTE_SERVER" ]]; then
@@ -45,8 +45,11 @@ if [[ -z "$REMOTE_SERVER" ]]; then
exit 1
fi
#-----------------------------------------------------------------------------------------------
#----------------------------- SSH Key Mapping --------------------------------------------------
#-----------------------------------------------------------------------------------------------
# SSH Key Mapping
declare -A SSH_KEYS
SSH_KEYS["$HOST1|$HOST2"]="/root/.ssh/Gmer4Lfe-rsync-key"
SSH_KEYS["$HOST2|$HOST1"]="/root/.ssh/Jayred365-rsync-key"