image was renamed, vpn hash was addedd

This commit is contained in:
2023-06-07 10:56:13 +00:00
parent e50a456722
commit d2cd02d8e8

View File

@@ -33,12 +33,18 @@ ask_envs() {
fi; fi;
fi fi
echo "VPN proxy? (y/N)"; echo "VPN proxy? (Y/n)";
read -r ANSWER; read -r ANSWER;
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then
VPN_PROXY="yes";
else
VPN_PROXY="no"; VPN_PROXY="no";
else
VPN_PROXY="yes";
echo "Please add a valid vpn hash key:";
while read -r VPN_HASH; do
if [ "$VPN_HASH" != "" ]; then
break;
fi;
done
fi fi
echo "Cron? (Y/n)"; echo "Cron? (Y/n)";
@@ -134,6 +140,12 @@ check_dirs_and_files() {
registry.format.hu/setup'"; registry.format.hu/setup'";
} > $HOME/.bash_aliases } > $HOME/.bash_aliases
if [ "$VPN_HASH" != "" ]; then
$SUDO_CMD mkdir -p /etc/user/secret/vpn-proxy;
echo $VPN_HASH | base64 -d > /tmp/wg0.conf;
$SUDO_CMD mv /tmp/wg0.conf /etc/user/secret/vpn-proxy/;
fi
} }
check_running() { check_running() {
@@ -291,7 +303,7 @@ check_dirs_and_files;
ask_envs; ask_envs;
$SUDO_CMD docker pull registry.format.hu/proxy-deployment-tool $SUDO_CMD docker pull registry.format.hu/installer-tool
$SUDO_CMD docker run \ $SUDO_CMD docker run \
--volume $HOME/.ssh/installer:/root/.ssh/id_rsa \ --volume $HOME/.ssh/installer:/root/.ssh/id_rsa \
@@ -307,7 +319,7 @@ $SUDO_CMD docker run \
--volume /etc/system/:/etc/system/ \ --volume /etc/system/:/etc/system/ \
--volume $DISCOVERY_DIR/:$DISCOVERY_DIR/ \ --volume $DISCOVERY_DIR/:$DISCOVERY_DIR/ \
--volume $DISCOVERY_CONFIG_DIR/:$DISCOVERY_CONFIG_DIR/ \ --volume $DISCOVERY_CONFIG_DIR/:$DISCOVERY_CONFIG_DIR/ \
--env LETSENCRYPT_MAIL=$LETSENCRYPT_MAIL registry.format.hu/proxy-deployment-tool --env LETSENCRYPT_MAIL=$LETSENCRYPT_MAIL registry.format.hu/installer-tool
# test - alias doesn't work inside a function # test - alias doesn't work inside a function