From 545e500a96c6ab1c90042e5eea49dc3ba59915af Mon Sep 17 00:00:00 2001 From: laci Date: Thu, 21 Dec 2023 10:48:04 +0000 Subject: [PATCH] ask for registry url --- install.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index d0b9bdb..af630e1 100755 --- a/install.sh +++ b/install.sh @@ -2,6 +2,12 @@ ask_envs() { + echo "Please fill in registry url (registry.format.hu): "; + read -r DOCKER_REGISTRY_URL; + if [ "$DOCKER_REGISTRY_URL" == "" ]; then + DOCKER_REGISTRY_URL="registry.format.hu"; + fi + echo "Smarthost proxy? (Y/n)"; read -r ANSWER; if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then @@ -163,7 +169,7 @@ check_dirs_and_files() { { echo "alias service-debian='$SUDO_CMD docker run --rm \ -w /services/ \ - -e DOCKER_REGISTRY_URL=registry.format.hu \ + -e DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL \ -e USER_INIT_PATH=/etc/user/config \ -e CA_PATH=/etc/ssl/certs \ -e DNS_DIR=/etc/system/data/dns \ @@ -176,7 +182,7 @@ check_dirs_and_files() { -v /etc/user/config/services/tmp:/services/tmp:rw \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /usr/bin/docker:/usr/bin/docker:ro \ - registry.format.hu/setup'"; + $DOCKER_REGISTRY_URL/setup'"; } > $HOME/.bash_aliases } @@ -563,8 +569,8 @@ if [ "$APT" == "1" ]; then fi fi; -$SUDO_CMD docker pull registry.format.hu/installer-tool -$SUDO_CMD docker pull registry.format.hu/setup +$SUDO_CMD docker pull $DOCKER_REGISTRY_URL/installer-tool +$SUDO_CMD docker pull $DOCKER_REGISTRY_URL/setup # first install if [ ! -f "/etc/user/config/system.json" ]; then @@ -634,7 +640,7 @@ if [ ! -f "/etc/user/config/system.json" ]; then --volume $HOME/.ssh/installer:/root/.ssh/id_rsa \ --volume /etc/user/:/etc/user/ \ --volume /etc/system/:/etc/system/ \ - --env LETSENCRYPT_MAIL=$LETSENCRYPT_MAIL registry.format.hu/installer-tool + --env LETSENCRYPT_MAIL=$LETSENCRYPT_MAIL $DOCKER_REGISTRY_URL/installer-tool fi; @@ -773,7 +779,7 @@ if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then --volume $HOME/.ssh/installer:/root/.ssh/id_rsa \ --volume /etc/user/:/etc/user/ \ --volume /etc/system/:/etc/system/ \ - registry.format.hu/installer-tool + $DOCKER_REGISTRY_URL/installer-tool fi WSL_DISTRO_NAME=""; # disable WSL systemd support installation - not working correctly @@ -791,7 +797,7 @@ if [ -n "$WSL_DISTRO_NAME" ]; then --volume /etc/user/:/etc/user/ \ --volume /etc/system/:/etc/system/ \ --volume /usr/local/bin/:/usr/local/bin/ \ - registry.format.hu/installer-tool + $DOCKER_REGISTRY_URL/installer-tool /usr/local/bin/wsl2-systemd-script.sh fi;