From 12a05cad369e64184db7d630ff307359cb04f88f Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Sat, 23 Jul 2022 12:48:10 +0900 Subject: [PATCH] fix --- configure-instance.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/configure-instance.sh b/configure-instance.sh index a697561..71eb286 100755 --- a/configure-instance.sh +++ b/configure-instance.sh @@ -1,6 +1,6 @@ -echo "Enter an url for the Frontend (eg: https://piped.kavin.rocks):" && read -r frontend -echo "Enter an url for the Backend (eg: https://pipedapi.kavin.rocks):" && read -r backend -echo "Enter an hostname for the Proxy (eg: https://pipedproxy.kavin.rocks):" && read -r proxy +echo "Enter an url for the Frontend (eg: https://piped.kavin.rocks):" && read -r frontend_url +echo "Enter an url for the Backend (eg: https://pipedapi.kavin.rocks):" && read -r backend_url +echo "Enter an hostname for the Proxy (eg: https://pipedproxy.kavin.rocks):" && read -r proxy_url echo "Enter the reverse proxy you would like to use (either caddy or nginx):" && read -r reverseproxy rm -rf config/ @@ -20,21 +20,21 @@ frontend_port=$(echo "$frontend_url"| awk -F[/:] '{print $5}'| { read -d '' port backend_port=$(echo "$backend_url"| awk -F[/:] '{print $5}'| { read -d '' port; [ -z "$port" ] && { [ "$backend_schema" = "https" ] && echo "443" || echo "80"; } || echo "$port"; }) proxy_port=$(echo "$proxy_url"| awk -F[/:] '{print $5}'| { read -d '' port; [ -z "$port" ] && { [ "$proxy_schema" = "https" ] && echo "443" || echo "80"; } || echo "$port"; }) -sed -i "s@FRONT_URL@$frontend_url@g" config/* -sed -i "s@BACKEND_URL@$backend_url@g" config/* -sed -i "s@PROXY_URL@$proxy_url@g" config/* +sed -i '' "s@FRONT_URL@$frontend_url@g" config/* +sed -i '' "s@BACKEND_URL@$backend_url@g" config/* +sed -i '' "s@PROXY_URL@$proxy_url@g" config/* -sed -i "s@FRONTEND_HOSTNAME@$frontend_hostname@g" config/* -sed -i "s@BACKEND_HOSTNAME@$backend_hostname@g" config/* -sed -i "s@PROXY_HOSTNAME@$proxy_hostname@g" config/* +sed -i '' "s@FRONTEND_HOSTNAME@$frontend_hostname@g" config/* +sed -i '' "s@BACKEND_HOSTNAME@$backend_hostname@g" config/* +sed -i '' "s@PROXY_HOSTNAME@$proxy_hostname@g" config/* -sed -i "s@FRONTEND_PORT@$frontend_port@g" config/* -sed -i "s@BACKEND_PORT@$backend_port@g" config/* -sed -i "s@PROXY_PORT@$proxy_port@g" config/* +sed -i '' "s@FRONTEND_PORT@$frontend_port@g" config/* +sed -i '' "s@BACKEND_PORT@$backend_port@g" config/* +sed -i '' "s@PROXY_PORT@$proxy_port@g" config/* # The openj9 image does not support aarch64 if [[ "$(uname -m)" == "aarch64" ]]; then - sed -i "s/piped:latest/piped:hotspot/g" config/* + sed -i '' "s/piped:latest/piped:hotspot/g" config/* fi mv config/docker-compose.$reverseproxy.yml docker-compose.yml