HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/self/root/usr/local/CyberCP/upgrade.sh
#!/bin/bash
## Script to clear caches after static file changes. Useful for development and testing.
## All credit belongs to Usman Nasir
## To use make it executable
## chmod +x /usr/local/CyberCP/upgrade.sh
## Then run it like below.
## /usr/local/CyberCP/upgrade.sh

# Check if virtual environment exists
if [[ ! -f /usr/local/CyberCP/bin/python ]]; then
    echo "Error: CyberPanel virtual environment not found at /usr/local/CyberCP/bin/python"
    echo "Please ensure CyberPanel is properly installed."
    exit 1
fi

cd /usr/local/CyberCP && /usr/local/CyberCP/bin/python manage.py collectstatic --no-input
rm -rf /usr/local/CyberCP/public/static/*
cp -R  /usr/local/CyberCP/static/* /usr/local/CyberCP/public/static/
# CSF support removed - discontinued on August 31, 2025
# mkdir /usr/local/CyberCP/public/static/csf/
find /usr/local/CyberCP -type d -exec chmod 0755 {} \;
find /usr/local/CyberCP -type f -exec chmod 0644 {} \;
chmod -R 755 /usr/local/CyberCP/bin
chown -R root:root /usr/local/CyberCP
chown -R lscpd:lscpd /usr/local/CyberCP/public/phpmyadmin/tmp
systemctl restart lscpd