Sha256: 9de4948d8e3d45aeaa2935cbc3dc33c7c9a9da6798ac5ccc8b3ddc9c21c492e2

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

# coding: utf-8
module CLISplash

  class Config < Thor
    include Splash::ConfigUtilities
    include Splash::Helpers
    include Splash::Exiter
    include Splash::Loggers


    desc "setup", "Setup installation fo Splash"
    long_desc <<-LONGDESC
    Setup installation fo Splash\n
    with --preserve, preserve from reinstallation of the config
    LONGDESC
    option :preserve, :type => :boolean,  :aliases => "-P"
    def setup
      acase = run_as_root :setupsplash, options
      splash_exit acase
    end

    desc "sanitycheck", "Verify installation fo Splash"
    def sanitycheck
      acase = run_as_root :checkconfig
      splash_exit acase
    end

    desc "version", "Display current Splash version"
    def version
      log = get_logger
      config = get_config
      log.info "Splash version : #{config.version}, Author : #{config.author}"
      log.info config.copyright
      splash_exit case: :quiet_exit
    end

    desc "service", "Install Splashd Systemd service"
    def service
      acase = run_as_root :addservice
      splash_exit acase
    end

    desc "flushbackend", "Flush configured backend"
    def flushbackend
      acase = run_as_root :flush_backend
      splash_exit acase
    end


  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prometheus-splash-0.5.3 lib/splash/cli/config.rb
prometheus-splash-0.5.2 lib/splash/cli/config.rb