This commit is contained in:
Alexey Berezhok
2026-05-03 16:32:53 +03:00
parent 8add078e7c
commit a3888d10b4
10 changed files with 267 additions and 5 deletions

View File

@@ -189,6 +189,22 @@ class BunkerwebWorker < Kernel::ModuleCoreWorker
puts output
ACTION_OK
end
when "alias"
m_domain = args[1].strip unless args[1].nil?
m_alias = args[2].strip unless args[1].nil?
if m_domain.nil?
log_return("Domain should be specified. #{args}")
else
log("add alias to domain to bunkerweb protection")
output = `/usr/local/hestia/bin/v-bunkerweb-module alias #{m_domain} "#{m_alias}" shell`
exit_status = $?.exitstatus
if exit_status != 0
log_return("Command failed with status #{exit_status}")
else
ACTION_OK
end
end
when "help"
puts "#{$0} bunkerweb_module COMMAND [OPTIONS] [json|csv|plain]"
puts "COMMANDS:"