Guest User

Untitled

a guest
Jun 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. found = nil
  2. IO.popen('ps aux'){|x|
  3. while a = x.gets
  4. if (a =~ /postgres/ ) then
  5. found = true
  6. break
  7. end
  8. end
  9. }
  10. puts found ? "yes!" : "no!"
Add Comment
Please, Sign In to add comment