Class: LinuxAdmin::System

Inherits:
Object
  • Object
show all
Extended by:
Common
Defined in:
lib/linux_admin/system.rb

Constant Summary

Constants included from Common

Common::BIN_DIRS

Class Method Summary collapse

Methods included from Common

cmd, cmd?, run, run!

Class Method Details

.reboot!Object



5
6
7
8
# File 'lib/linux_admin/system.rb', line 5

def self.reboot!
  run!(cmd(:shutdown),
      :params => { "-r" => "now" })
end

.shutdown!Object



10
11
12
13
# File 'lib/linux_admin/system.rb', line 10

def self.shutdown!
  run!(cmd(:shutdown),
      :params => { "-h" => "0" })
end