mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #4004] [MERGED] Fix SSL domain setup on reinstall: reuse existing certs and avoid false success/failure logs #5581
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5581
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/4004
Author: @Kookiejarz
Created: 4/7/2026
Status: ✅ Merged
Merged: 4/17/2026
Merged by: @MHSanaei
Base:
main← Head:main📝 Commits (4)
e1a09b5perf: replace /dev/urandom | tr with openssl rand to fix CPU spike09d3447Merge branch 'MHSanaei:main' into main99ce1fcfix: add cron to default package installation and improve SSL certificate handling03e7e4cReworked--installcertsuccess criteria, cleanup behavior adjusted.📊 Changes
3 files changed (+156 additions, -99 deletions)
View changed files
📝
install.sh(+59 -38)📝
update.sh(+60 -39)📝
x-ui.sh(+37 -22)📄 Description
What is the pull request?
closes #4002 #3851 #3979
This PR fixes SSL setup logic in interactive install/update scripts for domain certificates.
It resolves cases where:
Problem
During reinstall / setup with an already-issued domain cert, scripts could show contradictory output:
Also, existing certs were treated as hard failure (return 1 / exit 1) instead of being reused and installed to panel cert paths.
Root Cause
Changes
In domain SSL flow, when ${domain} already exists in acme.sh --list, scripts
now:
For acme.sh --installcert:
This avoids false negatives caused only by reload command environment differences.
In prompt_and_setup_ssl (domain option):
needed)
Files Changed
Validation
acme.sh --list.Which part of the application is affected by the change?
Type of Changes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.