From 24a073be567dd2467b1d4d4e1b4e2ea45099b83c Mon Sep 17 00:00:00 2001 From: Raine Date: Mon, 30 Oct 2023 00:59:38 +0100 Subject: [PATCH] fix: script --- tools/migration/initial-connection-to-server.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/migration/initial-connection-to-server.sh b/tools/migration/initial-connection-to-server.sh index b725ee3..5da2690 100755 --- a/tools/migration/initial-connection-to-server.sh +++ b/tools/migration/initial-connection-to-server.sh @@ -6,12 +6,15 @@ if ! [ "$(id -u)" = "0" ]; then exit 1 fi +if ! [ "$HOSTNAME" = "link" ]; then + echo "this should only be ran on link" + exit 1 +fi + scp \ - -i /etc/ixvd/secrets/ssh/keys/master/ixvd-master \ /etc/ixvd/secrets/ssh/keys/master/ixvd-master \ root@$1:.ssh/id_rsa ssh \ - -i /etc/ixvd/secrets/ssh/keys/master/ixvd-master \ root@$1 \ chmod 600 .ssh/id_rsa \ No newline at end of file