mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-16 19:46:48 +01:00
Install logs: show paths at start and on completion; dns-one path fix; shell/composer fixes; doc install log locations
This commit is contained in:
@@ -929,8 +929,13 @@ except:
|
||||
echo "This may take several minutes. Please be patient."
|
||||
echo ""
|
||||
|
||||
# Create log directory
|
||||
# Create log directory (same as v2.4.4: installer logs go here)
|
||||
mkdir -p /var/log/CyberPanel
|
||||
echo " Installation logs:"
|
||||
echo " • /var/log/CyberPanel/install.log (installer script messages)"
|
||||
echo " • /var/log/CyberPanel/install_output.log (Python installer stdout/stderr)"
|
||||
echo " • /var/log/installLogs.txt (install.py detailed log)"
|
||||
echo ""
|
||||
|
||||
# Run the installer with live output monitoring
|
||||
echo "Starting CyberPanel installer with live progress monitoring..."
|
||||
@@ -1223,6 +1228,11 @@ except:
|
||||
echo " INSTALLATION COMPLETED"
|
||||
echo "==============================================================================================================="
|
||||
echo ""
|
||||
echo " Installation logs (for troubleshooting):"
|
||||
echo " • /var/log/CyberPanel/install.log (installer script messages)"
|
||||
echo " • /var/log/CyberPanel/install_output.log (Python installer stdout/stderr)"
|
||||
echo " • /var/log/installLogs.txt (install.py detailed log)"
|
||||
echo ""
|
||||
|
||||
# Check if installation was successful
|
||||
if [ $install_exit_code -ne 0 ]; then
|
||||
|
||||
@@ -2258,10 +2258,11 @@ module cyberpanel_ols {
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
# Copy the PowerDNS configuration file
|
||||
# Copy the PowerDNS configuration file (cwd may be temp dir with install/ subdir when run from cyberpanel.sh)
|
||||
source_file = os.path.join(self.cwd, "dns-one", "pdns.conf")
|
||||
if not os.path.exists(source_file):
|
||||
# Try alternative location
|
||||
source_file = os.path.join(self.cwd, "install", "dns-one", "pdns.conf")
|
||||
if not os.path.exists(source_file):
|
||||
source_file = os.path.join(self.cwd, "dns", "pdns.conf")
|
||||
|
||||
if os.path.exists(source_file):
|
||||
@@ -6250,8 +6251,10 @@ vmail
|
||||
dnsPath = "/etc/powerdns/pdns.conf"
|
||||
os.makedirs("/etc/powerdns", exist_ok=True)
|
||||
|
||||
# Copy the PowerDNS configuration file
|
||||
# Copy the PowerDNS configuration file (cwd may be temp dir with install/ subdir)
|
||||
source_file = os.path.join(self.cwd, "dns-one", "pdns.conf")
|
||||
if not os.path.exists(source_file):
|
||||
source_file = os.path.join(self.cwd, "install", "dns-one", "pdns.conf")
|
||||
if not os.path.exists(source_file):
|
||||
source_file = os.path.join(self.cwd, "dns", "pdns.conf")
|
||||
|
||||
|
||||
@@ -558,6 +558,15 @@ def call(command, distro, bracket, message, log=0, do_exit=0, code=os.EX_OK, she
|
||||
if os.path.isfile(fallback):
|
||||
command = command.replace(bad_path, fallback)
|
||||
shell = True
|
||||
# Use /tmp/composer.sh when command references relative composer.sh (avoids "chmod: cannot access 'composer.sh'")
|
||||
# Only replace local file refs, not URLs (e.g. https://cyberpanel.sh/composer.sh)
|
||||
if not os.path.isfile(os.path.join(os.getcwd(), 'composer.sh')):
|
||||
if './composer.sh' in command:
|
||||
command = command.replace('./composer.sh', '/tmp/composer.sh')
|
||||
shell = True
|
||||
elif ' composer.sh' in command and 'http' not in command.split('composer.sh')[0][-20:]:
|
||||
command = command.replace(' composer.sh', ' /tmp/composer.sh')
|
||||
shell = True
|
||||
|
||||
# Check for apt lock before running apt commands
|
||||
if 'apt-get' in command or 'apt ' in command:
|
||||
@@ -568,8 +577,8 @@ def call(command, distro, bracket, message, log=0, do_exit=0, code=os.EX_OK, she
|
||||
return False
|
||||
|
||||
# CRITICAL: Use shell=True for commands with shell metacharacters
|
||||
# Avoids "No matching repo to modify: 2>/dev/null, true, ||" when shlex.split splits them
|
||||
if not shell and any(x in command for x in (' || ', ' 2>/dev', ' 2>', ' | ', '; true', '|| true')):
|
||||
# Avoids "No matching repo to modify: 2>/dev/null, true, ||" and "Could not resolve host: |" when shlex.split splits them
|
||||
if not shell and (any(x in command for x in (' || ', ' 2>/dev', ' 2>', ' | ', '; true', '|| true')) or '|' in command):
|
||||
shell = True
|
||||
|
||||
# CRITICAL: For mysql/mariadb commands, always use shell=True and full binary path
|
||||
|
||||
@@ -4,6 +4,27 @@ Reference for all standard and branch-specific install/upgrade/downgrade command
|
||||
|
||||
---
|
||||
|
||||
## Installation logs (v2.4.4 / v2.5.5-dev)
|
||||
|
||||
When you run the installer (cyberpanel.sh or install.py), logs are written to:
|
||||
|
||||
| Log | Location | Description |
|
||||
|-----|----------|--------------|
|
||||
| Installer script | `/var/log/CyberPanel/install.log` | Messages from cyberpanel.sh (print_status) |
|
||||
| Installer output | `/var/log/CyberPanel/install_output.log` | Full stdout/stderr of the Python installer (tee) |
|
||||
| Python installer | `/var/log/installLogs.txt` | Detailed log from install.py (installLog module) |
|
||||
|
||||
To inspect after a failed install:
|
||||
|
||||
```bash
|
||||
tail -100 /var/log/CyberPanel/install_output.log
|
||||
tail -100 /var/log/installLogs.txt
|
||||
```
|
||||
|
||||
**If you see ERR_CONNECTION_TIMED_OUT** when opening the panel URL: the install may have failed before LiteSpeed was set up, or ports are blocked. Ensure ports **8090** (panel) and **7080** (LSWS admin) are open in the server firewall and in your cloud security group (e.g. AWS). Re-run the installer after pulling the latest fixes so the install can complete.
|
||||
|
||||
---
|
||||
|
||||
## Fresh install
|
||||
|
||||
### One-liner (official / upstream)
|
||||
|
||||
Reference in New Issue
Block a user