Better error handling in singbox_shell.sh

This commit is contained in:
Iam54r1n4
2025-02-07 23:06:17 +00:00
parent 908d97f6b3
commit 87d54d2ef5

View File

@ -64,6 +64,10 @@ start_service() {
update_env_file "$domain" "$port" update_env_file "$domain" "$port"
create_service_file create_service_file
if [ $? -ne 0 ]; then
echo -e "${red}Error: Failed to create the service file. ${NC}"
exit 1
fi
chown -R hysteria:hysteria "/etc/letsencrypt/live/$domain" chown -R hysteria:hysteria "/etc/letsencrypt/live/$domain"
chown -R hysteria:hysteria /etc/hysteria/core/scripts/singbox chown -R hysteria:hysteria /etc/hysteria/core/scripts/singbox
systemctl daemon-reload systemctl daemon-reload