#!/usr/bin/env ruby # coding: utf-8 # major include require 'splash/dependencies' require 'splash/cli' #inhibit warning : due to prometheus-client call to URI.encode warning $-w = nil include Splash::Dependencies include Splash::Helpers include Splash::Exiter include Splash::Loggers include Splash::Config # auto setup unless verify_file(name: CONFIG_FILE, mode: "644", owner: user_root, group: group_root).empty? then puts 'Splash need reconfiguration : Auto setup launch' if is_root? then acase = setupsplash splash_exit acase else puts 'ERROR : auto setup not start, because your not root, please run as root :' puts '(sudo or rvmsudo) splash [conf setup]' exit 50 end end # running Thor CLI.start(ARGV)