-echo ""
-echo "Setup Finished, Your BookStack instance should now be installed."
-echo "MySQL was installed without a root password, It is recommended that you set a root MySQL password."
-echo ""
-echo "You can access your BookStack instance at: http://$CURRENT_IP/ or http://$DOMAIN/"
+info_msg "This script logs full output to $LOGPATH which may help upon issues."
+sleep 1
+
+run_pre_install_checks
+run_prompt_for_domain_if_required
+info_msg ""
+info_msg "Installing using the domain/IP \"$DOMAIN\""
+info_msg ""
+sleep 1
+
+info_msg "[1/9] Installing required system packages... (This may take several minutes)"
+run_package_installs >> "$LOGPATH" 2>&1
+
+info_msg "[2/9] Preparing MySQL database..."
+run_database_setup >> "$LOGPATH" 2>&1
+
+info_msg "[3/9] Downloading BookStack to ${BOOKSTACK_DIR}..."
+run_bookstack_download >> "$LOGPATH" 2>&1
+
+info_msg "[4/9] Installing Composer (PHP dependency manager)..."
+run_install_composer >> "$LOGPATH" 2>&1
+
+info_msg "[5/9] Installing PHP dependencies using composer..."
+run_install_bookstack_composer_deps >> "$LOGPATH" 2>&1
+
+info_msg "[6/9] Creating and populating BookStack .env file..."
+run_update_bookstack_env >> "$LOGPATH" 2>&1
+
+info_msg "[7/9] Running initial BookStack database migrations..."
+run_bookstack_database_migrations >> "$LOGPATH" 2>&1
+
+info_msg "[8/9] Setting BookStack file & folder permissions..."
+run_set_application_file_permissions >> "$LOGPATH" 2>&1
+
+info_msg "[9/9] Configuring apache server..."
+run_configure_apache >> "$LOGPATH" 2>&1
+
+info_msg "----------------------------------------------------------------"
+info_msg "Setup finished, your BookStack instance should now be installed!"
+info_msg "Default login password: password"
+info_msg "Access URL: http://$CURRENT_IP/ or http://$DOMAIN/"
+info_msg "BookStack Install Directory: $BOOKSTACK_DIR"
+info_msg "Install Script Log: $LOGPATH"
+info_msg "---------------------------------------------------------------"