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
385882fc40
commit
a8e81eb341
30
INSTALL.sh
30
INSTALL.sh
@ -930,12 +930,32 @@ setup_openpanel() {
|
|||||||
cp -fr services/panel.service ${SERVICES_DIR}panel.service
|
cp -fr services/panel.service ${SERVICES_DIR}panel.service
|
||||||
|
|
||||||
echo "Installing PIP requirements for User panel.."
|
echo "Installing PIP requirements for User panel.."
|
||||||
|
|
||||||
# FIX FOR: https://peps.python.org/pep-0668/
|
|
||||||
if [[ ($current_python_version == "311" || $current_python_version == "312") ]]; then
|
# Check if lsb_release command is available
|
||||||
debug_log "Installing PIP requirements for OpenPanel with break-system-packages..."
|
if command -v lsb_release &> /dev/null; then
|
||||||
debug_log pip install -r requirements.txt --break-system-packages
|
# Get the release information
|
||||||
|
release=$(lsb_release -rs)
|
||||||
|
|
||||||
|
# Check if it's Ubuntu 22
|
||||||
|
if [[ $release == "22."* ]]; then
|
||||||
|
debug_log "Installing PIP requirements for OpenPanel without break-system-packages..."
|
||||||
|
debug_log pip install -r requirements.txt
|
||||||
|
# Check if it's Ubuntu 24
|
||||||
|
elif [[ $release == "24."* ]]; then
|
||||||
|
debug_log "Installing PIP requirements for OpenPanel with break-system-packages..."
|
||||||
|
debug_log pip install -r requirements.txt --break-system-packages
|
||||||
|
elif [[ ($current_python_version == "311" || $current_python_version == "312") ]]; then
|
||||||
|
# FIX FOR: https://peps.python.org/pep-0668/
|
||||||
|
debug_log "Installing PIP requirements for OpenPanel with break-system-packages..."
|
||||||
|
debug_log pip install -r requirements.txt --break-system-packages
|
||||||
|
else
|
||||||
|
echo "Unknown Ubuntu version: $release and unsuported python version: $current_python_version"
|
||||||
|
debug_log "Installing PIP requirements for OpenPanel without break-system-packages..."
|
||||||
|
debug_log pip install -r requirements.txt
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
|
echo "lsb_release command not found. Unable to determine Ubuntu version."
|
||||||
debug_log "Installing PIP requirements for OpenPanel without break-system-packages..."
|
debug_log "Installing PIP requirements for OpenPanel without break-system-packages..."
|
||||||
debug_log pip install -r requirements.txt
|
debug_log pip install -r requirements.txt
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user