Change dependency: use Python package for certbot
This commit is contained in:
@ -2,15 +2,15 @@
|
|||||||
source /etc/hysteria/core/scripts/utils.sh
|
source /etc/hysteria/core/scripts/utils.sh
|
||||||
define_colors
|
define_colors
|
||||||
|
|
||||||
install_dependencies() {
|
# install_dependencies() {
|
||||||
echo "Installing necessary dependencies..."
|
# echo "Installing necessary dependencies..."
|
||||||
apt-get install certbot -y > /dev/null 2>&1
|
# apt-get install certbot -y > /dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
# if [ $? -ne 0 ]; then
|
||||||
echo -e "${red}Error: Failed to install certbot. ${NC}"
|
# echo -e "${red}Error: Failed to install certbot. ${NC}"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
echo -e "${green}Certbot installed successfully. ${NC}"
|
# echo -e "${green}Certbot installed successfully. ${NC}"
|
||||||
}
|
# }
|
||||||
|
|
||||||
update_env_file() {
|
update_env_file() {
|
||||||
local domain=$1
|
local domain=$1
|
||||||
@ -53,7 +53,7 @@ start_service() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_dependencies
|
# install_dependencies
|
||||||
|
|
||||||
echo "Generating SSL certificates for $domain..."
|
echo "Generating SSL certificates for $domain..."
|
||||||
certbot certonly --standalone --agree-tos --register-unsafely-without-email -d "$domain"
|
certbot certonly --standalone --agree-tos --register-unsafely-without-email -d "$domain"
|
||||||
|
|||||||
@ -2,15 +2,15 @@
|
|||||||
source /etc/hysteria/core/scripts/utils.sh
|
source /etc/hysteria/core/scripts/utils.sh
|
||||||
define_colors
|
define_colors
|
||||||
|
|
||||||
install_dependencies() {
|
# install_dependencies() {
|
||||||
echo "Installing necessary dependencies..."
|
# echo "Installing necessary dependencies..."
|
||||||
apt-get install certbot -y > /dev/null 2>&1
|
# apt-get install certbot -y > /dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
# if [ $? -ne 0 ]; then
|
||||||
echo -e "${red}Error: Failed to install certbot. ${NC}"
|
# echo -e "${red}Error: Failed to install certbot. ${NC}"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
echo -e "${green}Certbot installed successfully. ${NC}"
|
# echo -e "${green}Certbot installed successfully. ${NC}"
|
||||||
}
|
# }
|
||||||
|
|
||||||
update_env_file() {
|
update_env_file() {
|
||||||
local domain=$1
|
local domain=$1
|
||||||
@ -53,7 +53,7 @@ start_service() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_dependencies
|
# install_dependencies
|
||||||
|
|
||||||
echo "Generating SSL certificates for $domain..."
|
echo "Generating SSL certificates for $domain..."
|
||||||
certbot certonly --standalone --agree-tos --register-unsafely-without-email -d "$domain"
|
certbot certonly --standalone --agree-tos --register-unsafely-without-email -d "$domain"
|
||||||
|
|||||||
Reference in New Issue
Block a user