Class: TplinkAdmin::App

Inherits:
Thor
  • Object
show all
Defined in:
lib/tplink-admin/app.rb

Instance Method Summary collapse

Instance Method Details

#configObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/tplink-admin/app.rb', line 11

def config
  Configuration.save
  if !ENV['EDITOR'].to_s.empty? && !ENV['EDITOR'].nil?
    exec "$EDITOR #{ENV['HOME']}/.tplinkadmin"
  else
    puts "$EDITOR is not set. Please type your editor:"
    editor = STDIN.gets.chomp
    exec "#{editor} #{ENV['HOME']}/.tplinkadmin"
  end
end

#rebootObject



75
76
77
78
# File 'lib/tplink-admin/app.rb', line 75

def reboot
  result = Client.get "SysRebootRpm.htm?Reboot=Reboot"
  puts result.status
end