This commit is contained in:
Alexey Berezhok
2026-05-12 01:27:01 +03:00
parent 9d1afcdf28
commit 3cc428df43
2 changed files with 8 additions and 3 deletions

View File

@@ -230,6 +230,10 @@ class HestiaBunkerWebApi
variables["USE_ANTIBOT"] = options[:anti_bot] || "captcha"
end
variables["ANTIBOT_IGNORE_URI"] = options[:anti_bot_ignore_uri] || "^/\.well-known/acme-challenge/.+$"
variables["LETS_ENCRYPT_PASSTHROUGH"] = options[:lets_encrypt_passthrough] || "yes"
service_body = {
server_name: service_name,
is_draft: false,

View File

@@ -46,12 +46,13 @@ class BunkerwebWorker < Kernel::ModuleCoreWorker
case m_command
when "add"
m_domain = args[1].strip unless args[1].nil?
if m_domain.nil?
log_return("Domain should be specified. #{args}")
m_ip = args[2].strip unless args[2].nil?
if m_domain.nil? || m_ip.nil?
log_return("Domain and IP should be specified. #{args}")
else
log("add domain to bunkerweb protection")
output = `/usr/local/hestia/bin/v-bunkerweb-module add #{m_domain} shell`
output = `/usr/local/hestia/bin/v-bunkerweb-module add #{m_domain} #{m_ip} shell`
exit_status = $?.exitstatus
if exit_status != 0
log_return("Command failed with status #{exit_status}")