Fixes
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user