Commit a37bbb0486e757418d0fce962c04aed6055355ba:
add a command to show passenger status
Branch: refs/heads/master
Author: Sam Ruby <[email protected]>
Committer: Sam Ruby <[email protected]>
Pusher: rubys <[email protected]>
------------------------------------------------------------
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