gdipfupdt.pm 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #######################################################################
  2. # gdipfupdt.pm
  3. #
  4. # This file really is the GnuDIP update server FastCGI. The
  5. # gdipupdt.cgi script just executes the gdipfupdt subroutine.
  6. #
  7. # See COPYING for licensing information.
  8. #
  9. #######################################################################
  10. # Perl modules
  11. use strict;
  12. use FCGI;
  13. use POSIX;
  14. # global variables
  15. use vars qw($conf $logger);
  16. # GnuDIP modules
  17. use gdiplib;
  18. use gdipfrun;
  19. sub gdipfupdt {
  20. # functions to run in thread
  21. my $initfunc = shift;
  22. my $acptfunc = shift;
  23. # get preferences from config file
  24. $conf = getconf();
  25. if (! $conf) {
  26. print STDERR "GnuDIP FastCGI has exited - getconf returned nothing\n";
  27. exit 1;
  28. }
  29. # logger command
  30. $logger = $$conf{'logger_updt'};
  31. if (! defined $logger) {
  32. $logger = $$conf{'logger_cgi'};
  33. }
  34. # call common routine
  35. gdipfrun($initfunc, $acptfunc);
  36. }
  37. #####################################################
  38. # must return 1
  39. #####################################################
  40. 1;