mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-03-01 01:20:49 +03:00
bash - minor change
This commit is contained in:
parent
41d39dfaa8
commit
8404b33232
15
x-ui.sh
15
x-ui.sh
@ -833,7 +833,7 @@ ssl_cert_issue_main() {
|
|||||||
echo "Existing domains:"
|
echo "Existing domains:"
|
||||||
echo "$domains"
|
echo "$domains"
|
||||||
read -p "Please enter a domain from the list to revoke the certificate: " domain
|
read -p "Please enter a domain from the list to revoke the certificate: " domain
|
||||||
if [[ " $domains " =~ " $domain " ]]; then
|
if echo "$domains" | grep -qw "$domain"; then
|
||||||
~/.acme.sh/acme.sh --revoke -d ${domain}
|
~/.acme.sh/acme.sh --revoke -d ${domain}
|
||||||
LOGI "Certificate revoked for domain: $domain"
|
LOGI "Certificate revoked for domain: $domain"
|
||||||
else
|
else
|
||||||
@ -849,7 +849,7 @@ ssl_cert_issue_main() {
|
|||||||
echo "Existing domains:"
|
echo "Existing domains:"
|
||||||
echo "$domains"
|
echo "$domains"
|
||||||
read -p "Please enter a domain from the list to renew the SSL certificate: " domain
|
read -p "Please enter a domain from the list to renew the SSL certificate: " domain
|
||||||
if [[ " $domains " =~ " $domain " ]]; then
|
if echo "$domains" | grep -qw "$domain"; then
|
||||||
~/.acme.sh/acme.sh --renew -d ${domain} --force
|
~/.acme.sh/acme.sh --renew -d ${domain} --force
|
||||||
LOGI "Certificate forcefully renewed for domain: $domain"
|
LOGI "Certificate forcefully renewed for domain: $domain"
|
||||||
else
|
else
|
||||||
@ -884,13 +884,13 @@ ssl_cert_issue_main() {
|
|||||||
echo "Available domains:"
|
echo "Available domains:"
|
||||||
echo "$domains"
|
echo "$domains"
|
||||||
read -p "Please choose a domain to set the panel paths: " domain
|
read -p "Please choose a domain to set the panel paths: " domain
|
||||||
if [[ " $domains " =~ " $domain " ]]; then
|
|
||||||
|
if echo "$domains" | grep -qw "$domain"; then
|
||||||
local webCertFile="/root/cert/${domain}/fullchain.pem"
|
local webCertFile="/root/cert/${domain}/fullchain.pem"
|
||||||
local webKeyFile="/root/cert/${domain}/privkey.pem"
|
local webKeyFile="/root/cert/${domain}/privkey.pem"
|
||||||
|
|
||||||
if [[ -f "${webCertFile}" && -f "${webKeyFile}" ]]; then
|
if [[ -f "${webCertFile}" && -f "${webKeyFile}" ]]; then
|
||||||
/usr/local/x-ui/x-ui cert -webCert "$webCertFile"
|
/usr/local/x-ui/x-ui cert -webCert "$webCertFile" -webCertKey "$webKeyFile"
|
||||||
/usr/local/x-ui/x-ui cert -webCertKey "$webKeyFile"
|
|
||||||
echo "Panel paths set for domain: $domain"
|
echo "Panel paths set for domain: $domain"
|
||||||
echo " - Certificate File: $webCertFile"
|
echo " - Certificate File: $webCertFile"
|
||||||
echo " - Private Key File: $webKeyFile"
|
echo " - Private Key File: $webKeyFile"
|
||||||
@ -902,6 +902,7 @@ ssl_cert_issue_main() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Invalid choice"
|
echo "Invalid choice"
|
||||||
;;
|
;;
|
||||||
@ -1023,8 +1024,7 @@ ssl_cert_issue() {
|
|||||||
local webKeyFile="/root/cert/${domain}/privkey.pem"
|
local webKeyFile="/root/cert/${domain}/privkey.pem"
|
||||||
|
|
||||||
if [[ -f "$webCertFile" && -f "$webKeyFile" ]]; then
|
if [[ -f "$webCertFile" && -f "$webKeyFile" ]]; then
|
||||||
/usr/local/x-ui/x-ui cert -webCert "$webCertFile"
|
/usr/local/x-ui/x-ui cert -webCert "$webCertFile" -webCertKey "$webKeyFile"
|
||||||
/usr/local/x-ui/x-ui cert -webCertKey "$webKeyFile"
|
|
||||||
LOGI "Panel paths set for domain: $domain"
|
LOGI "Panel paths set for domain: $domain"
|
||||||
LOGI " - Certificate File: $webCertFile"
|
LOGI " - Certificate File: $webCertFile"
|
||||||
LOGI " - Private Key File: $webKeyFile"
|
LOGI " - Private Key File: $webKeyFile"
|
||||||
@ -1146,7 +1146,6 @@ run_speedtest() {
|
|||||||
# Run Speedtest
|
# Run Speedtest
|
||||||
speedtest
|
speedtest
|
||||||
}
|
}
|
||||||
|
|
||||||
create_iplimit_jails() {
|
create_iplimit_jails() {
|
||||||
# Use default bantime if not passed => 15 minutes
|
# Use default bantime if not passed => 15 minutes
|
||||||
local bantime="${1:-15}"
|
local bantime="${1:-15}"
|
||||||
|
Loading…
Reference in New Issue
Block a user