Browse Source

Now the cgi loads

Andy Baugh 5 years ago
parent
commit
70562cbb34
4 changed files with 6 additions and 2 deletions
  1. 1 0
      Makefile
  2. 4 1
      cgi/pgupgrade.cgi
  3. BIN
      img/troglophant.png
  4. 1 1
      templates/ui/pgupgrade.tmpl

+ 1 - 0
Makefile

@@ -3,6 +3,7 @@ all: install
 
 install:
 	/usr/local/cpanel/3rdparty/bin/perl install/install.pl
+	chmod +x /usr/local/cpanel/whostmgr/docroot/cgi/troglodyne/pgupgrade.cgi
 	/usr/local/cpanel/bin/register_appconfig ./plugin/better_postgres.conf
 
 uninstall:

+ 4 - 1
cgi/pgupgrade.cgi

@@ -1,11 +1,14 @@
 #!/usr/local/cpanel/3rdparty/bin/perl
+#WHMADDON:better_postgres:PostgreSQL Upgrade:troglophant.png
+#ACLS:all
+
 package Troglodyne::CGI::PgUpgrade;
 
 # TODO move to lib/ and just symlink it into cgi? lol
 use strict;
 use warnings;
 
-use Cpanel::Template::Simple ();
+use Cpanel::Template ();
  
 run() unless caller();
  

BIN
img/troglophant.png


+ 1 - 1
templates/ui/pgupgrade.tmpl

@@ -12,7 +12,7 @@ SET styleSheets = [
 ];
  
 WRAPPER 'master_templates/master.tmpl'
-    header = locale.maketext("WHM Example Plugin")
+    header = '<img src="/addon_plugins/troglophant.png"></img> ' _ locale.maketext("PostgreSQL Upgrade by ") _ '<a href="https://troglodyne.net">Troglodyne</a>'
     stylesheets = styleSheets,
     theme='bootstrap';
 %]