mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update INSTALL.sh
This commit is contained in:
22
INSTALL.sh
22
INSTALL.sh
@@ -34,6 +34,7 @@ RED='\033[0;31m'
|
||||
RESET='\033[0m'
|
||||
|
||||
# Defaults
|
||||
CUSTOM_VERSION=false
|
||||
INSTALL_TIMEOUT=1800 # 30 min
|
||||
DEBUG=false
|
||||
SKIP_APT_UPDATE=false
|
||||
@@ -174,14 +175,16 @@ if [ -z "$current_ip" ]; then
|
||||
fi
|
||||
|
||||
|
||||
# Fetch the latest version
|
||||
version=$(curl -s https://update.openpanel.co/)
|
||||
if [[ $version =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
|
||||
version=$version
|
||||
else
|
||||
version="0.1.7"
|
||||
fi
|
||||
|
||||
if [ "$CUSTOM_VERSION" = false ]; then
|
||||
# Fetch the latest version
|
||||
version=$(curl -s https://update.openpanel.co/)
|
||||
if [[ $version =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
|
||||
version=$version
|
||||
else
|
||||
version="0.1.7"
|
||||
fi
|
||||
fi
|
||||
|
||||
# print fullwidth line
|
||||
print_space_and_line() {
|
||||
@@ -364,6 +367,11 @@ parse_args() {
|
||||
# Extract path after "--post_install="
|
||||
post_install_path="${1#*=}"
|
||||
;;
|
||||
--version=*)
|
||||
# Extract path after "--version="
|
||||
CUSTOM_VERSION=true
|
||||
version="${1#*=}"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $arg"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user