whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/2] Commit a37bbb0: add a command to show passenger status
Date Mon, 18 Jan 2016 19:20:22 GMT
Commit a37bbb0486e757418d0fce962c04aed6055355ba:
    add a command to show passenger status


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/status/passenger.cgi                                     | +++++++++++ 
------------------------------------------------------------
21 changes: 21 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/status/passenger.cgi b/www/status/passenger.cgi
new file mode 100755
index 0000000..f06cf95
--- /dev/null
+++ b/www/status/passenger.cgi
@@ -0,0 +1,21 @@
+#!/usr/local/bin/ruby2.3.0
+
+require 'open3'
+output, error, status = Open3.capture3 '/usr/local/bin/ruby2.3.0',
+  Gem.bin_path('passenger', 'passenger-status')
+
+require 'wunderbar'
+_html do
+  _h1 'Phusion Passenger Status'
+  _pre output
+
+  unless error.empty?
+    _h2 'STDERR'
+    _pre error
+  end
+
+  unless status.success?
+    _h2 'Status'
+    _pre status
+  end
+end

Mime
View raw message