Class: Zlown::Script

Inherits:
Object
  • Object
show all
Defined in:
lib/zlown/script/script.rb

Class Method Summary collapse

Class Method Details

.httpry_start(args = [], opts = {}) ⇒ Object



11
12
13
14
15
# File 'lib/zlown/script/script.rb', line 11

def self.httpry_start(args = [], opts = {})
  cmd = "httpry -d -P #{Zlown::Config::HTTPRY_PID_FILE} -i wlan1 -o /root/.zlown/data/httpry.log -b /root/.zlown/data/httpry.bin"
  puts cmd
  system cmd
end

.httpry_stop(args = [], opts = {}) ⇒ Object



17
18
19
20
21
22
# File 'lib/zlown/script/script.rb', line 17

def self.httpry_stop(args = [], opts = {})
  pid = File.open(Zlown::Config::HTTPRY_PID_FILE).read.to_i
  cmd = "kill #{pid}"
  puts cmd
  system cmd
end