pgupgrade.cgi 732 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/local/cpanel/3rdparty/bin/perl
  2. #WHMADDON:better_postgres:PostgreSQL Upgrade:troglophant.png
  3. #ACLS:all
  4. package Troglodyne::CGI::PgUpgrade;
  5. use strict;
  6. use warnings;
  7. use Cpanel::Template ();
  8. use Cpanel::LoadModule::Custom ();
  9. run() unless caller();
  10. sub run {
  11. Cpanel::LoadModule::Custom::load_perl_module("Troglodyne::CGI");
  12. my $args = Troglodyne::CGI::get_args();
  13. my $tmpl = 'pgupgrade';
  14. if( $args->{'version'} ) {
  15. $tmpl = 'pginstall';
  16. }
  17. print "Content-type: text/html\r\n\r\n";
  18. Cpanel::Template::process_template(
  19. 'whostmgr',
  20. {
  21. 'template_file' => 'troglodyne/pgupgrade.tmpl',
  22. 'print' => 1,
  23. }
  24. );
  25. exit;
  26. }
  27. 1;