From e6a90e728f2cba28b4ee5eedaf7f097951a099e5 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 16 Nov 2023 12:16:20 +0000 Subject: [PATCH] Modify conditions for update/upgrade --- installers/common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index 70415d3f..2a64afde 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -563,9 +563,9 @@ function _create_openvpn_scripts() { # Fetches latest files from github to webroot function _download_latest_files() { - if [ -d "$webroot_dir" ] && [ -z "$update" ]; then + if [ -d "$webroot_dir" ] && [ "$update" == 0 ]; then sudo mv $webroot_dir "$webroot_dir.`date +%F-%R`" || _install_status 1 "Unable to remove old webroot directory" - elif [ "$update" == 1 ]; then + elif [ "$upgrade" == 1 ] || [ "$update" == 1 ]; then sudo rm -rf "$webroot_dir" fi