Skip to content

Commit

Permalink
Fix to correctly test if SSL host default domain was requested succes…
Browse files Browse the repository at this point in the history
…sfully
  • Loading branch information
iliajie committed Aug 20, 2023
1 parent 50bc0a7 commit afbe2f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion virtualmin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ if ! cd "$srcdir"; then
echo "Error: Failed to enter $srcdir temporary directory"
exit 1
fi
export tempdir

This comment has been minimized.

Copy link
@swelljoe

swelljoe Sep 18, 2023

Collaborator

What's going on here?

This comment has been minimized.

Copy link
@iliajie

iliajie Sep 18, 2023

Author Contributor

Nothing extraordinary. We export it to have it available in a child process (Virtualmin Config).

I doubt the error that was reported earlier has anything to do with our install script!

Although, I'll double check and comment on this post if I find anything.

This comment has been minimized.

Copy link
@iliajie

iliajie Sep 18, 2023

Author Contributor

There was a problem indeed! The more detailed explanation is here.

This comment has been minimized.

Copy link
@swelljoe

swelljoe Sep 18, 2023

Collaborator

Polluting the environment is extraordinary.

This comment has been minimized.

Copy link
@iliajie

iliajie Sep 18, 2023

Author Contributor

Polluting the environment is extraordinary.

We just need to pass it to Virtualmin Config in a simple and straight forward way.


pre_check_http_client() {
# Check for wget or curl or fetch
Expand Down Expand Up @@ -1321,8 +1322,13 @@ kill "$config_system_pid" 1>/dev/null 2>&1
# Make sure the cursor is back (if spinners misbehaved)
tput cnorm 1>/dev/null 2>&1

printf "${GREEN}▣▣▣${NORMAL} Cleaning up\\n"
# Was host default domain SSL request successful?
if [ -d "$tempdir/virtualmin_ssl_host_success" ]; then
ssl_host_success=1
fi

# Cleanup the tmp files
printf "${GREEN}▣▣▣${NORMAL} Cleaning up\\n"
if [ "$tempdir" != "" ] && [ "$tempdir" != "/" ]; then
log_debug "Cleaning up temporary files in $tempdir."
find "$tempdir" -delete
Expand Down

0 comments on commit afbe2f8

Please sign in to comment.