Skip to content

Commit f4c429f

Browse files
committed
Fix to have library domain configurable depending on the branch
1 parent 43f8ac2 commit f4c429f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

virtualmin-install.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ vm_version=7
1717
download_virtualmin_host="${download_virtualmin_host:-software.virtualmin.com}"
1818
download_virtualmin_host_lib="$download_virtualmin_host/lib"
1919
download_virtualmin_host_dev="${download_virtualmin_host_dev:-software.virtualmin.dev}"
20+
download_virtualmin_host_rc="${download_virtualmin_host_rc:-rc.software.virtualmin.dev}"
2021
download_webmin_host_dev="${download_webmin_host_dev:-download.webmin.dev}"
22+
download_webmin_host_rc="${download_webmin_host_rc:-rc.download.webmin.dev}"
2123

2224
# Save current working directory
2325
pwd="$PWD"
@@ -357,13 +359,23 @@ if [ -n "$showversion" ]; then
357359
bind_hook "show_version"
358360
fi
359361

362+
# Update variables based on branch
363+
if [ "$branch" = 'unstable' ]; then
364+
download_virtualmin_host_lib="$download_virtualmin_host_dev"
365+
elif [ "$branch" = 'prerelease' ]; then
366+
download_virtualmin_host_lib="$download_virtualmin_host_rc"
367+
fi
368+
360369
# If connectivity test is requested
361370
if [ -n "$test_connection_type" ]; then
362371
for test_type in $test_connection_type; do
363372
test_connection "$download_virtualmin_host" "$test_type"
364-
if [ -n "$branch" ]; then
365-
test_connection "$download_virtualmin_host_dev" "$test_type"
373+
if [ "$branch" = "unstable" ]; then
366374
test_connection "$download_webmin_host_dev" "$test_type"
375+
test_connection "$download_virtualmin_host_dev" "$test_type"
376+
elif [ "$branch" = "prerelease" ]; then
377+
test_connection "$download_webmin_host_rc" "$test_type"
378+
test_connection "$download_virtualmin_host_rc" "$test_type"
367379
fi
368380
done
369381
exit 0

0 commit comments

Comments
 (0)