Add check if the helper scripts exist
This commit is contained in:
parent
5654555ee9
commit
0cccd98953
11
msman.sh
11
msman.sh
@ -231,7 +231,6 @@ function helper_scripts_update {
|
|||||||
rm ms-manager-helper.tar.gz
|
rm ms-manager-helper.tar.gz
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download the update for the script
|
# Download the update for the script
|
||||||
@ -263,6 +262,8 @@ function self_update {
|
|||||||
|
|
||||||
# Check helper scripts update
|
# Check helper scripts update
|
||||||
function check_helper_scripts {
|
function check_helper_scripts {
|
||||||
|
if [[ -d .ms-manager ]]; then
|
||||||
|
source "./ms-manager/version.sh"
|
||||||
if [[ $CURRENT_SCRIPT_VERSION != $EXTRA_SCRIPTS_VERSION ]]; then
|
if [[ $CURRENT_SCRIPT_VERSION != $EXTRA_SCRIPTS_VERSION ]]; then
|
||||||
echo "Helper script verion mismatch!"
|
echo "Helper script verion mismatch!"
|
||||||
echo "Main script version: $CURRENT_SCRIPT_VERSION"
|
echo "Main script version: $CURRENT_SCRIPT_VERSION"
|
||||||
@ -271,6 +272,11 @@ function check_helper_scripts {
|
|||||||
echo "The script will now download the same version of the helper scripts as the main script."
|
echo "The script will now download the same version of the helper scripts as the main script."
|
||||||
helper_scripts_update
|
helper_scripts_update
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Helper scripts not found."
|
||||||
|
echo "The script will now download the helper scripts."
|
||||||
|
helper_scripts_update
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get latest script version
|
# Get latest script version
|
||||||
@ -382,7 +388,8 @@ function delete_old_server {
|
|||||||
|
|
||||||
# Load the rest of the script
|
# Load the rest of the script
|
||||||
function load_script {
|
function load_script {
|
||||||
# TODO: Check if the script files exist
|
# DONE: Check if the script files exist
|
||||||
|
# - Checked in check_helper_scripts
|
||||||
source "./.ms-manager/detect_server.sh"
|
source "./.ms-manager/detect_server.sh"
|
||||||
source "./.ms-manager/java.sh"
|
source "./.ms-manager/java.sh"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user