ask for registry url
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-21 10:48:04 +00:00
parent cb1e0bbc05
commit 545e500a96

View File

@@ -2,6 +2,12 @@
ask_envs() { 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)"; echo "Smarthost proxy? (Y/n)";
read -r ANSWER; read -r ANSWER;
if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then
@@ -163,7 +169,7 @@ check_dirs_and_files() {
{ {
echo "alias service-debian='$SUDO_CMD docker run --rm \ echo "alias service-debian='$SUDO_CMD docker run --rm \
-w /services/ \ -w /services/ \
-e DOCKER_REGISTRY_URL=registry.format.hu \ -e DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL \
-e USER_INIT_PATH=/etc/user/config \ -e USER_INIT_PATH=/etc/user/config \
-e CA_PATH=/etc/ssl/certs \ -e CA_PATH=/etc/ssl/certs \
-e DNS_DIR=/etc/system/data/dns \ -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 /etc/user/config/services/tmp:/services/tmp:rw \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker:ro \ -v /usr/bin/docker:/usr/bin/docker:ro \
registry.format.hu/setup'"; $DOCKER_REGISTRY_URL/setup'";
} > $HOME/.bash_aliases } > $HOME/.bash_aliases
} }
@@ -563,8 +569,8 @@ if [ "$APT" == "1" ]; then
fi fi
fi; fi;
$SUDO_CMD docker pull registry.format.hu/installer-tool $SUDO_CMD docker pull $DOCKER_REGISTRY_URL/installer-tool
$SUDO_CMD docker pull registry.format.hu/setup $SUDO_CMD docker pull $DOCKER_REGISTRY_URL/setup
# first install # first install
if [ ! -f "/etc/user/config/system.json" ]; then 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 $HOME/.ssh/installer:/root/.ssh/id_rsa \
--volume /etc/user/:/etc/user/ \ --volume /etc/user/:/etc/user/ \
--volume /etc/system/:/etc/system/ \ --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; fi;
@@ -773,7 +779,7 @@ if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then
--volume $HOME/.ssh/installer:/root/.ssh/id_rsa \ --volume $HOME/.ssh/installer:/root/.ssh/id_rsa \
--volume /etc/user/:/etc/user/ \ --volume /etc/user/:/etc/user/ \
--volume /etc/system/:/etc/system/ \ --volume /etc/system/:/etc/system/ \
registry.format.hu/installer-tool $DOCKER_REGISTRY_URL/installer-tool
fi fi
WSL_DISTRO_NAME=""; # disable WSL systemd support installation - not working correctly 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/user/:/etc/user/ \
--volume /etc/system/:/etc/system/ \ --volume /etc/system/:/etc/system/ \
--volume /usr/local/bin/:/usr/local/bin/ \ --volume /usr/local/bin/:/usr/local/bin/ \
registry.format.hu/installer-tool $DOCKER_REGISTRY_URL/installer-tool
/usr/local/bin/wsl2-systemd-script.sh /usr/local/bin/wsl2-systemd-script.sh
fi; fi;