mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update INSTALL.sh
This commit is contained in:
parent
805c09ede1
commit
fd37bb801c
188
INSTALL.sh
188
INSTALL.sh
@ -51,6 +51,7 @@ SETUP_SWAP_ANYWAY=false
|
|||||||
SWAP_FILE="1"
|
SWAP_FILE="1"
|
||||||
SELFHOSTED_SCREENSHOTS=false
|
SELFHOSTED_SCREENSHOTS=false
|
||||||
SEND_EMAIL_AFTER_INSTALL=false
|
SEND_EMAIL_AFTER_INSTALL=false
|
||||||
|
SET_PREMIUM=false
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
LOG_FILE="openpanel_install.log"
|
LOG_FILE="openpanel_install.log"
|
||||||
@ -244,7 +245,7 @@ FUNCTIONS=(
|
|||||||
temp_fix_for_skeleton
|
temp_fix_for_skeleton
|
||||||
setup_swap
|
setup_swap
|
||||||
configure_mysql
|
configure_mysql
|
||||||
|
set_premium_features
|
||||||
start_services
|
start_services
|
||||||
set_system_cronjob
|
set_system_cronjob
|
||||||
cleanup
|
cleanup
|
||||||
@ -361,94 +362,94 @@ parse_args() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for arg in "$@"; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $arg in
|
case $1 in
|
||||||
--hostname=*)
|
--key=*)
|
||||||
# Extract domain after "--hostname="
|
SET_PREMIUM=true
|
||||||
SET_HOSTNAME_NOW=true
|
license_key="${1#*=}"
|
||||||
new_hostname="${1#*=}"
|
;;
|
||||||
;;
|
--hostname=*)
|
||||||
--skip-requirements)
|
SET_HOSTNAME_NOW=true
|
||||||
SKIP_REQUIREMENTS=true
|
new_hostname="${1#*=}"
|
||||||
;;
|
;;
|
||||||
--skip-panel-check)
|
--skip-requirements)
|
||||||
SKIP_PANEL_CHECK=true
|
SKIP_REQUIREMENTS=true
|
||||||
;;
|
;;
|
||||||
--skip-apt-update)
|
--skip-panel-check)
|
||||||
SKIP_APT_UPDATE=true
|
SKIP_PANEL_CHECK=true
|
||||||
;;
|
;;
|
||||||
--repair)
|
--skip-apt-update)
|
||||||
REPAIR=true
|
SKIP_APT_UPDATE=true
|
||||||
SKIP_PANEL_CHECK=true
|
;;
|
||||||
SKIP_REQUIREMENTS=true
|
--repair)
|
||||||
;;
|
REPAIR=true
|
||||||
--overlay2)
|
SKIP_PANEL_CHECK=true
|
||||||
OVERLAY=true
|
SKIP_REQUIREMENTS=true
|
||||||
;;
|
;;
|
||||||
--skip-firewall)
|
--overlay2)
|
||||||
SKIP_FIREWALL=true
|
OVERLAY=true
|
||||||
;;
|
;;
|
||||||
--skip-images)
|
--skip-firewall)
|
||||||
SKIP_IMAGES=true
|
SKIP_FIREWALL=true
|
||||||
;;
|
;;
|
||||||
--skip-blacklists)
|
--skip-images)
|
||||||
IPSETS=false
|
SKIP_IMAGES=true
|
||||||
;;
|
;;
|
||||||
--skip-ssl)
|
--skip-blacklists)
|
||||||
SKIP_SSL=true
|
IPSETS=false
|
||||||
;;
|
;;
|
||||||
--with_modsec)
|
--skip-ssl)
|
||||||
MODSEC=true
|
SKIP_SSL=true
|
||||||
;;
|
;;
|
||||||
--debug)
|
--with_modsec)
|
||||||
DEBUG=true
|
MODSEC=true
|
||||||
;;
|
;;
|
||||||
--ips)
|
--debug)
|
||||||
SUPPORT_IPS=true
|
DEBUG=true
|
||||||
;;
|
;;
|
||||||
--no-ssh)
|
--ips)
|
||||||
NO_SSH=true
|
SUPPORT_IPS=true
|
||||||
;;
|
;;
|
||||||
--enable-ftp)
|
--no-ssh)
|
||||||
INSTALL_FTP=true
|
NO_SSH=true
|
||||||
;;
|
;;
|
||||||
--enable-mail)
|
--enable-ftp)
|
||||||
INSTALL_MAIL=true
|
INSTALL_FTP=true
|
||||||
;;
|
;;
|
||||||
--post_install=*)
|
--enable-mail)
|
||||||
# Extract path after "--post_install="
|
INSTALL_MAIL=true
|
||||||
post_install_path="${1#*=}"
|
;;
|
||||||
;;
|
--post_install=*)
|
||||||
--screenshots=*)
|
post_install_path="${1#*=}"
|
||||||
# Extract path after "--screenshots="
|
;;
|
||||||
SCREENSHOTS_API_URL="${1#*=}"
|
--screenshots=*)
|
||||||
;;
|
SCREENSHOTS_API_URL="${1#*=}"
|
||||||
--version=*)
|
;;
|
||||||
# Extract path after "--version="
|
--version=*)
|
||||||
CUSTOM_VERSION=true
|
CUSTOM_VERSION=true
|
||||||
version="${1#*=}"
|
version="${1#*=}"
|
||||||
;;
|
;;
|
||||||
--swap=*)
|
--swap=*)
|
||||||
# Extract path after "--swap="
|
SETUP_SWAP_ANYWAY=true
|
||||||
SETUP_SWAP_ANYWAY=true
|
SWAP="${1#*=}"
|
||||||
SWAP="${1#*=}"
|
;;
|
||||||
;;
|
--email=*)
|
||||||
--email=*)
|
SEND_EMAIL_AFTER_INSTALL=true
|
||||||
# Extract path after "--email="
|
EMAIL="${1#*=}"
|
||||||
SEND_EMAIL_AFTER_INSTALL=true
|
;;
|
||||||
EMAIL="${1#*=}"
|
-h|--help)
|
||||||
;;
|
show_help
|
||||||
-h|--help)
|
exit 0
|
||||||
show_help
|
;;
|
||||||
exit 0
|
*)
|
||||||
;;
|
echo "Unknown option: $1"
|
||||||
*)
|
show_help
|
||||||
echo "Unknown option: $arg"
|
exit 1
|
||||||
show_help
|
;;
|
||||||
exit 1
|
esac
|
||||||
;;
|
shift
|
||||||
esac
|
done
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
detect_installed_panels() {
|
detect_installed_panels() {
|
||||||
@ -1208,6 +1209,15 @@ download_and_import_docker_images() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
set_premium_features(){
|
||||||
|
if [ "$SET_HOSTNAME_NOW" = true ]; then
|
||||||
|
echo "Setting OpenPanel enterprise version license key $license_key"
|
||||||
|
opencli config update key "$license_key"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set_custom_hostname(){
|
set_custom_hostname(){
|
||||||
if [ "$SET_HOSTNAME_NOW" = true ]; then
|
if [ "$SET_HOSTNAME_NOW" = true ]; then
|
||||||
# Check if the provided hostname is a valid FQDN
|
# Check if the provided hostname is a valid FQDN
|
||||||
|
Loading…
Reference in New Issue
Block a user