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
4722fea140
commit
4e6646e92e
@ -5,7 +5,7 @@
|
|||||||
# Usage: bash <(curl -sSL https://openpanel.org)
|
# Usage: bash <(curl -sSL https://openpanel.org)
|
||||||
# Author: Stefan Pejcic <stefan@pejcic.rs>
|
# Author: Stefan Pejcic <stefan@pejcic.rs>
|
||||||
# Created: 11.07.2023
|
# Created: 11.07.2023
|
||||||
# Last Modified: 18.08.2024
|
# Last Modified: 22.08.2024
|
||||||
# Company: openpanel.com
|
# Company: openpanel.com
|
||||||
# Copyright (c) OPENPANEL
|
# Copyright (c) OPENPANEL
|
||||||
#
|
#
|
||||||
@ -29,44 +29,43 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
|
||||||
# Colors for output
|
# COLORS
|
||||||
GREEN='\033[0;32m'
|
GREEN='\033[0;32m'
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
RESET='\033[0m'
|
RESET='\033[0m'
|
||||||
|
|
||||||
# Defaults
|
# DEFAULTS
|
||||||
CUSTOM_VERSION=false #default is latest
|
CUSTOM_VERSION=false # default version is latest
|
||||||
INSTALL_TIMEOUT=600 # 10 min max
|
INSTALL_TIMEOUT=600 # after 10min, consider the install failed
|
||||||
DEBUG=false #verbose output
|
DEBUG=false # verbose output for debugging failed install
|
||||||
SKIP_APT_UPDATE=false
|
SKIP_APT_UPDATE=false
|
||||||
SKIP_IMAGES=false #downloaded on acc creation
|
SKIP_IMAGES=false # they are auto-pulled on account creation
|
||||||
REPAIR=false
|
REPAIR=false
|
||||||
LOCALES=true #only en
|
LOCALES=true # only en
|
||||||
NO_SSH=false #deny port 22
|
NO_SSH=false # deny port 22
|
||||||
INSTALL_FTP=false #no ui
|
INSTALL_FTP=false # no ui yet
|
||||||
INSTALL_MAIL=false #no ui
|
INSTALL_MAIL=false # no ui yet
|
||||||
IPSETS=true #currently only with ufw
|
IPSETS=true # currently only works with ufw
|
||||||
SET_HOSTNAME_NOW=false #FQDN
|
SET_HOSTNAME_NOW=false # must be a FQDN
|
||||||
SETUP_SWAP_ANYWAY=false
|
SETUP_SWAP_ANYWAY=false
|
||||||
SWAP_FILE="1" #calculated based on ram
|
SWAP_FILE="1" # calculated based on ram
|
||||||
SELFHOSTED_SCREENSHOTS=false
|
|
||||||
SEND_EMAIL_AFTER_INSTALL=false
|
SEND_EMAIL_AFTER_INSTALL=false
|
||||||
SET_PREMIUM=false #added in 0.2.1
|
SET_PREMIUM=false # added in 0.2.1
|
||||||
UFW_SETUP=false #previous default on <0.2.3
|
UFW_SETUP=false # previous default on <0.2.3
|
||||||
CSF_SETUP=true #default since >0.2.2
|
CSF_SETUP=true # default since >0.2.2
|
||||||
SET_ADMIN_USERNAME=false #random
|
SET_ADMIN_USERNAME=false # random
|
||||||
SET_ADMIN_PASSWORD=false #random
|
SET_ADMIN_PASSWORD=false # random
|
||||||
SCREENSHOTS_API_URL="http://screenshots-api.openpanel.co/screenshot" #default since 0.2.1
|
SCREENSHOTS_API_URL="http://screenshots-api.openpanel.co/screenshot" # default since 0.2.1
|
||||||
|
|
||||||
# Paths
|
# PATHS
|
||||||
ETC_DIR="/etc/openpanel/" #comf files
|
ETC_DIR="/etc/openpanel/" # https://github.com/stefanpejcic/openpanel-configuration
|
||||||
LOG_FILE="openpanel_install.log" #install log
|
LOG_FILE="openpanel_install.log" # install log
|
||||||
LOCK_FILE="/root/openpanel.lock" # install running
|
LOCK_FILE="/root/openpanel.lock" # install running
|
||||||
OPENPANEL_DIR="/usr/local/panel/" #openpanel running successfully
|
OPENPANEL_DIR="/usr/local/panel" # currently only used to store version
|
||||||
OPENPADMIN_DIR="/usr/local/admin/" #openadmin files
|
OPENPADMIN_DIR="/usr/local/admin/" # https://github.com/stefanpejcic/openadmin/branches
|
||||||
OPENCLI_DIR="/usr/local/admin/scripts/" #opencli scripts
|
OPENCLI_DIR="/usr/local/admin/scripts/" # https://dev.openpanel.com/cli/commands.html
|
||||||
OPENPANEL_ERR_DIR="/var/log/openpanel/" #logs
|
OPENPANEL_ERR_DIR="/var/log/openpanel/" # https://dev.openpanel.com/logs.html
|
||||||
SERVICES_DIR="/etc/systemd/system/" #services
|
SERVICES_DIR="/etc/systemd/system/" # used for admin, sentinel and floatingip services
|
||||||
|
|
||||||
# Redirect output to the log file
|
# Redirect output to the log file
|
||||||
exec > >(tee -a "$LOG_FILE") 2>&1
|
exec > >(tee -a "$LOG_FILE") 2>&1
|
||||||
@ -452,7 +451,7 @@ detect_installed_panels() {
|
|||||||
if [ -z "$SKIP_PANEL_CHECK" ]; then
|
if [ -z "$SKIP_PANEL_CHECK" ]; then
|
||||||
# Define an associative array with key as the directory path and value as the error message
|
# Define an associative array with key as the directory path and value as the error message
|
||||||
declare -A paths=(
|
declare -A paths=(
|
||||||
["/usr/local/panel"]="You already have OpenPanel installed. ${RESET}\nInstead, did you want to update? Run ${GREEN}'opencli update --force' to update OpenPanel."
|
["$OPENPANEL_DIR"]="You already have OpenPanel installed. ${RESET}\nInstead, did you want to update? Run ${GREEN}'opencli update --force' to update OpenPanel."
|
||||||
["/usr/local/cpanel/whostmgr"]="cPanel WHM is installed. OpenPanel only supports servers without any hosting control panel installed."
|
["/usr/local/cpanel/whostmgr"]="cPanel WHM is installed. OpenPanel only supports servers without any hosting control panel installed."
|
||||||
["/opt/psa/version"]="Plesk is installed. OpenPanel only supports servers without any hosting control panel installed."
|
["/opt/psa/version"]="Plesk is installed. OpenPanel only supports servers without any hosting control panel installed."
|
||||||
["/usr/local/psa/version"]="Plesk is installed. OpenPanel only supports servers without any hosting control panel installed."
|
["/usr/local/psa/version"]="Plesk is installed. OpenPanel only supports servers without any hosting control panel installed."
|
||||||
@ -1371,11 +1370,11 @@ create_admin_and_show_logins_success_message() {
|
|||||||
chmod +x /etc/profile.d/welcome.sh
|
chmod +x /etc/profile.d/welcome.sh
|
||||||
|
|
||||||
#cp version file
|
#cp version file
|
||||||
mkdir -p /usr/local/panel/ > /dev/null 2>&1
|
mkdir -p $OPENPANEL_DIR > /dev/null 2>&1
|
||||||
echo "$PANEL_VERSION" > /usr/local/panel/version
|
echo "$PANEL_VERSION" > $OPENPANEL_DIR/version
|
||||||
######docker cp openpanel:/usr/local/panel/version /usr/local/panel/version > /dev/null 2>&1
|
######docker cp openpanel:$OPENPANEL_DIR/version $OPENPANEL_DIR/version > /dev/null 2>&1
|
||||||
|
|
||||||
echo -e "${GREEN}OpenPanel [$(cat /usr/local/panel/version)] installation complete.${RESET}"
|
echo -e "${GREEN}OpenPanel [$(cat $OPENPANEL_DIR/version)] installation complete.${RESET}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Restore normal output to the terminal, so we dont save generated admin password in log file!
|
# Restore normal output to the terminal, so we dont save generated admin password in log file!
|
||||||
|
Loading…
Reference in New Issue
Block a user