Skip to content

Commit

Permalink
update text for failed downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
enoch85 authored Oct 9, 2020
1 parent 26fb295 commit ab5ca3b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1023,11 +1023,18 @@ download_script() {
rm -f "${SCRIPTS}/${2}.sh" "${SCRIPTS}/${2}.php" "${SCRIPTS}/${2}.py"
if ! { curl_to_dir "${!1}" "${2}.sh" "$SCRIPTS" || curl_to_dir "${!1}" "${2}.php" "$SCRIPTS" || curl_to_dir "${!1}" "${2}.py" "$SCRIPTS"; }
then
print_text_in_color "$IRed" "{$2} failed to download. Please run: 'sudo curl -sLO ${!1}/${2}.sh|.php|.py' again."
print_text_in_color "$ICyan" "If you get this error when running the nextcloud-startup-script then just re-run it with:"
print_text_in_color "$ICyan" "'sudo bash $SCRIPTS/nextcloud-startup-script.sh' and all the scripts will be downloaded again"
print_text_in_color "$IRed" "{$2} failed to download."
sleep 2
if ! yesno_box_yes "Are you running the first setup of this server?"
then
msg_box "Please run sudo bash '$SCRIPTS/update.sh' from your CLI to get the latest scripts from Github, needed for a successful run."
else
msg_box "If you get this error when running the first setup script, then just re-run it with: 'sudo bash $SCRIPTS/nextcloud-startup-script.sh' from your CLI, and all the scripts will be downloaded again.
If it still fails, please report this issue to: $ISSUES."
fi
fi
exit 1
fi
}

# call like: run_script folder_variable name_of_script
Expand Down

0 comments on commit ab5ca3b

Please sign in to comment.