Added fixes ti bunkerweb module
This commit is contained in:
@@ -157,6 +157,22 @@ class BunkerwebWorker < Kernel::ModuleCoreWorker
|
||||
hestia_print_array_of_hashes(result, format, "API_USERNAME,API_PASSWORD,ADMIN_USERNAME,ADMIN_PASSWORD")
|
||||
ACTION_OK
|
||||
when "configure"
|
||||
require 'shellwords'
|
||||
param1 = args[1]
|
||||
param2 = args[2]
|
||||
if param1 && param2 && !param1.strip.empty? && !param2.strip.empty?
|
||||
cmd = "/usr/local/hestia/bin/v-bunkerweb-module-install #{Shellwords.escape(param1)} #{Shellwords.escape(param2)}"
|
||||
else
|
||||
cmd = "/usr/local/hestia/bin/v-bunkerweb-module-install"
|
||||
end
|
||||
output = `#{cmd} 2>&1`
|
||||
exit_status = $?.exitstatus
|
||||
if exit_status != 0
|
||||
log_return("#{output}\nCommand failed with status #{exit_status}")
|
||||
else
|
||||
puts output
|
||||
ACTION_OK
|
||||
end
|
||||
when "help"
|
||||
puts "#{$0} bunkerweb_module COMMAND [OPTIONS] [json|csv|plain]"
|
||||
puts "COMMANDS:"
|
||||
|
||||
Reference in New Issue
Block a user