lib/splash/webadmin.rb in prometheus-splash-0.8.5 vs lib/splash/webadmin.rb in prometheus-splash-0.8.6
- old
+ new
@@ -18,10 +18,11 @@
# Start the Splash Daemon
# @param [Hash] options
# @option options [Symbol] :quiet activate quiet mode for log (limit to :fatal)
+ # @option options [Symbol] :foreground run webadmin in foreground
# @return [Hash] Exiter Case (:quiet_exit, :already_exist, :unknown_error or other)
def startweb(options = {})
require 'splash/webadmin/main'
config = get_config
log = get_logger
@@ -35,10 +36,11 @@
end
daemon_config = {:description => config.webadmin_process_name,
:pid_file => config.webadmin_full_pid_path,
:stdout_trace => config.webadmin_full_stdout_trace_path,
- :stderr_trace => config.webadmin_full_stderr_trace_path
+ :stderr_trace => config.webadmin_full_stderr_trace_path,
+ :foreground => options[:foreground]
}
["int","term","hup"].each do |type| daemon_config["sig#{type}_handler".to_sym] = Proc::new { WebAdminApp.quit! } end
res = daemonize daemon_config do
log = get_logger logger: :web, force: true