mirror of
https://github.com/TheyCallMeSecond/sing-box-manager.git
synced 2024-11-16 19:56:10 +08:00
Update Install.sh
This commit is contained in:
parent
58129cb07a
commit
e5b57b6192
|
@ -1044,8 +1044,8 @@ function set_certificate_and_private_key() {
|
||||||
allowed_extensions=("crt" "pem" "cer" "der")
|
allowed_extensions=("crt" "pem" "cer" "der")
|
||||||
|
|
||||||
if [[ "$certificate_path" != "/etc/ssl/private/cert.crt" ]]; then
|
if [[ "$certificate_path" != "/etc/ssl/private/cert.crt" ]]; then
|
||||||
if ! ( -f "$certificate_path" && [[ "${allowed_extensions[@]}" =~ "${certificate_file##*.}" ]] ); then
|
if [[ ! -f "$certificate_path" || ! "${allowed_extensions[@]}" =~ "${certificate_file##*.}" ]]; then
|
||||||
echo -e "${RED}错误:证书文件不存在,请重新输入!${NC}"
|
echo -e "${RED}错误:证书文件不存在,请重新输入!${NC}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1060,8 +1060,8 @@ function set_certificate_and_private_key() {
|
||||||
allowed_extensions=("key" "pem" "pkcs8" "p12" "pfx")
|
allowed_extensions=("key" "pem" "pkcs8" "p12" "pfx")
|
||||||
|
|
||||||
if [[ "$private_key_path" != "/etc/ssl/private/private.key" ]]; then
|
if [[ "$private_key_path" != "/etc/ssl/private/private.key" ]]; then
|
||||||
if ! ( -f "$private_key_path" && [[ "${allowed_extensions[@]}" =~ "${private_key_file##*.}" ]] ); then
|
if [[ ! -f "$private_key_path" || ! "${allowed_extensions[@]}" =~ "${private_key_file##*.}" ]]; then
|
||||||
echo -e "${RED}错误:私钥文件不存在,请重新输入!${NC}"
|
echo -e "${RED}错误:私钥文件不存在,请重新输入!${NC}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user