lib/lnd/tool/daemon.rb in lnd-tool-0.1.0 vs lib/lnd/tool/daemon.rb in lnd-tool-0.2.0

- old
+ new

@@ -45,10 +45,10 @@ def stop Process.kill('KILL', pid_path.read.to_i) if running? end # Start block program as daemon. - def start() + def start base_dir.mkdir unless base_dir.exist? raise LND::Tool::Error, "process(#{pid_path.read.to_i}) already running." if running? Process.daemon(true) pid_path.write(Process.pid.to_s)