Sha256: d77d2d1ece39c4d4b2b0c20e9f22237ab67f9a127d785bcf60114f8089db255e

Contents?: true

Size: 1.55 KB

Versions: 7

Compression:

Stored size: 1.55 KB

Contents

# coding: utf-8

# module for all Thor subcommands
module CLISplash

  # Thor inherited class for configuration management
  class Config < Thor
    include Splash::ConfigUtilities
    include Splash::Helpers
    include Splash::Exiter
    include Splash::Loggers

    # Thor method : running of Splash setup
    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

    # Thor method : running of Splash sanitycheck
    desc "sanitycheck", "Verify installation fo Splash"
    def sanitycheck
      acase = run_as_root :checkconfig
      splash_exit acase
    end

    # Thor method : Getting the current Splash version
    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

    # Thor method : Installing Splashd Systemd service file
    desc "service", "Install Splashd Systemd service"
    def service
      acase = run_as_root :addservice
      splash_exit acase
    end


    # Thor method : flushing configured backend
    desc "flushbackend", "Flush configured backend"
    def flushbackend
      acase = run_as_root :flush_backend
      splash_exit acase
    end


  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
prometheus-splash-0.8.3 lib/splash/cli/config.rb
prometheus-splash-0.8.2 lib/splash/cli/config.rb
prometheus-splash-0.8.1 lib/splash/cli/config.rb
prometheus-splash-0.8.0 lib/splash/cli/config.rb
prometheus-splash-0.7.0 lib/splash/cli/config.rb
prometheus-splash-0.6.1 lib/splash/cli/config.rb
prometheus-splash-0.6.0 lib/splash/cli/config.rb