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."