From e8ed5586ebb55621b4c9fe170face1d11ae70d8e Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 11 Aug 2020 03:21:18 -0500 Subject: [PATCH] Improve reading & set proper docker options to run --- etherpad.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/etherpad.sh b/etherpad.sh index 6b2ee34..3c0c0b3 100644 --- a/etherpad.sh +++ b/etherpad.sh @@ -67,18 +67,20 @@ fi read -p "Set your etherpad docker admin password: " -r ETHERPAD_ADMIN_PASS + # Install required packages install_ifnot docker-ce install_ifnot postgresql-$PSGVER # Create DB +echo -e "> Creating postgresql database for cotainer...\n" sudo -u postgres psql < Webserver seems configured, skipping..." elif [ -f $WS_CONF ]; then - echo "Configuring webserver file..." + echo "> Setting up webserver configuration file..." sed -i "/Anything that didn't match above/i \ \ \ \ location \^\~\ \/etherpad\/ {" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" $WS_CONF sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" $WS_CONF @@ -115,23 +116,23 @@ elif [ -f $WS_CONF ]; then sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF sed -i "/Anything that didn't match above/i \\\n" $WS_CONF else - echo "No etherpad config done to server file, please report to: + echo "> No etherpad config done to server file, please report to: -> https://github.com/switnet-ltd/quick-jibri-installer/issues" fi # Configure config.js if [ $(grep -c "etherpad_base" $WS_CONF) != 0 ]; then - echo "$MEET_CONF seems configured, skipping..." + echo -e "> $MEET_CONF seems configured, skipping...\n" else - echo "Setting etherpad domain at $MEET_CONF..." + echo -e "> Setting etherpad domain at $MEET_CONF...\n" sed -i "/ domain: '$DOMAIN'/a\ \ \ \ \ \ \ \ etherpad_base: \'https://$DOMAIN/etherpad/p/\'," $MEET_CONF fi -echo "Checking nginx configuration..." +echo "> Checking nginx configuration..." nginx -t 2>/dev/null if [ $? = 0 ]; then - echo "Docker configuration seems fine, enabling it..." + echo -e " -- Docker configuration seems fine, enabling it." systemctl reload nginx else echo "Please check your configuration, something may be wrong."