@@ -0,0 +1,25 @@
+#!/usr/local/cpanel/3rdparty/bin/perl
+#ACLS:all
+
+package Troglodyne::CGI::API;
+use strict;
+use warnings;
+use Cpanel::LoadModule::Custom ();
+use JSON::XS ();
+run() unless caller();
+sub run {
+ # Process the args
+ # Get back the datastruct from the called module.
+ # Emit the JSON
+ print "Content-type: application/json\r\n\r\n";
+ print JSON::XS::encode_json($ret);
+ exit;
+}
+1;
@@ -4,7 +4,6 @@
package Troglodyne::CGI::PgUpgrade;
-# TODO move to lib/ and just symlink it into cgi? lol
use strict;
use warnings;
@@ -0,0 +1 @@
+../../../cgi/api.cgi
+../../../cgi/pgupgrade.cgi