diff --git a/local/bin/wp-installer.sh b/local/bin/wp-installer.sh index 654cbfd..450ed7f 100755 --- a/local/bin/wp-installer.sh +++ b/local/bin/wp-installer.sh @@ -178,7 +178,12 @@ function validate_u() { fi } if [ -z "${input_values_array[r]}" ] ; then - input_values_array[r]="www.${input_values_array[v]}" + if [ -f /etc/ssl/letsencrypt/${input_values_array[v]}.pem ]; then + HTTP=https + else + HTTP=http + fi + input_values_array[r]="$HTTP://www.${input_values_array[v]}" fi if [ -n "${input_values_array[r]}" ] ; then validate_u @@ -375,6 +380,13 @@ EOF /usr/bin/rm $virtualhost_basedir/${input_values_array[v]}/$virtualhost_htdocsdir/index.html fi + echo "WordPress Installed for ${input_values_array[v]}" + echo "URL: ${input_values_array[r]}" + echo "Admin Login: ${input_values_array[r]}/wp-login.php" + echo "Admin Email: ${input_values_array[e]}" + echo "Admin Username: ${input_values_array[u]}" + echo "Admin Password: ${input_values_array[p]}" + elif [[ "$option" == "q" ]]; then echo "Quiting without installing." elif [[ " ${input_keys_index[@]} " =~ " $option " ]]; then