From 4f8211b7af43c65014a193a1f58682dc0c7befc7 Mon Sep 17 00:00:00 2001 From: Dmitriy Safronov Date: Wed, 15 Jan 2025 16:52:57 +0400 Subject: [PATCH] key Signed-off-by: Dmitriy Safronov --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ae99cf2..f53bb29 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,11 +8,11 @@ die() { mkdir /root/openwrt test -n "$OPENWRT_SSH_CONFIG" && echo "$OPENWRT_SSH_CONFIG" > /root/openwrt/config -test -n "$OPENWRT_SSH_KEY_ED25519" && echo "$OPENWRT_SSH_KEY_ED25519" > /root/openwrt/id_ed25519 +test -n "$OPENWRT_SSH_KEY" && echo "$OPENWRT_SSH_KEY" > /root/openwrt/key test -n "$OPENWRT_SSH_KNOWN_HOSTS" && echo "$OPENWRT_SSH_KNOWN_HOSTS" > /root/openwrt/known_hosts rsync -a -og --chown=root:root /root/openwrt/ /root/.ssh/ || die "Couldn't rsync user ssh settings" chown -R root:root /root/.ssh || die "Couldn't change ownership for user ssh settings" chmod -R a-rwx,u+rwX /root/.ssh || die "Couldn't change access rights for user ssh settings" -rsync -acxv --delete-after --exclude '*-opkg' --exclude '/etc/uci-defaults/*' -e "ssh -p ${OPENWRT_SSH_PORT:-22}" "${OPENWRT_SSH_HOST:-root@192.168.1.1}:/overlay/upper/" overlay/ || die "Couldn't rsync router config" +rsync -acxv --delete-after --exclude '*-opkg' --exclude '/etc/uci-defaults/*' -e "ssh -p ${OPENWRT_SSH_PORT:-22} -i /root/.ssh/key" "${OPENWRT_SSH_HOST:-root@192.168.1.1}:/overlay/upper/" overlay/ || die "Couldn't rsync router config" -- GitLab