class Picobox::System

Attributes

os[R]

Public Class Methods

new(os) click to toggle source
# File lib/picobox/system.rb, line 8
def initialize(os)
  @os = os
end

Public Instance Methods

install() click to toggle source
# File lib/picobox/system.rb, line 12
def install
  accept(Commands::StartInstall.new)
  accept(Commands::GetRootPermission.new)
  accept(Commands::DownloadDocker.new)
  accept(Commands::InstallDocker.new)
  accept(Commands::InstallConfig.new)
  accept(Commands::UpdatePackages.new)
  accept(Commands::SetupShell.new)
  accept(Commands::FinishInstall.new)
  accept(Commands::ReloadShell.new)
rescue StandardError => e
  display_error e
  exit 1
end
restart() click to toggle source
# File lib/picobox/system.rb, line 54
def restart
  accept(Commands::Restart.new)
rescue StandardError => e
  display_error e
  exit 1
end
ssh(service) click to toggle source
# File lib/picobox/system.rb, line 62
def ssh(service)
  accept(Commands::SshInstance.new(service))
rescue StandardError => e
  display_error e
  exit 1
end
start() click to toggle source
# File lib/picobox/system.rb, line 38
def start
  accept(Commands::Start.new)
rescue StandardError => e
  display_error e
  exit 1
end
stop() click to toggle source
# File lib/picobox/system.rb, line 46
def stop
  accept(Commands::Stop.new)
rescue StandardError => e
  display_error e
  exit 1
end
uninstall() click to toggle source
# File lib/picobox/system.rb, line 28
def uninstall
  accept(Commands::StartUninstall.new)
  accept(Commands::RemoveSetupShell.new)
  accept(Commands::FinishUninstall.new)
rescue StandardError => e
  display_error e
  exit 1
end