Skip to content
Snippets Groups Projects
Select Git revision
  • 9069fdcd87c2b72c3eec0aa579b8492a334a6ece
  • master default protected
  • e-infra2
  • ci-megalinter-speedup
  • egi-fixes
  • e-infra
  • envri-hub-new-aai
  • egi-b2drop-no-collapse
  • lfs
  • gpu_staging
  • resurrect-testing-ownloud
  • experiments/collab
  • update_claim_group_keys
  • envri-hub
  • enable_rtc
  • eosc-ui
  • future/jupyterhub-5.x
  • versioning
  • eosc-templating
  • staging1-raw-image
  • token-exchange
21 results

versions.tf

Blame
  • WardenConf.pm 937 B
    #!/usr/bin/perl -w
    #
    # WardenConf.pm
    #
    # Copyright (C) 2011-2012 Cesnet z.s.p.o
    #
    # Use of this source is governed by a BSD-style license, see LICENSE file.
    
    package WardenConf;
    
    use strict;
    
    our $VERSION = "2.0";
    
    #-------------------------------------------------------------------------------
    # loadConf - load variables from configuration file
    #-------------------------------------------------------------------------------
    sub loadConf
    {
      my $conf_file = shift;
    
      # preset of default variables
      our $URI = undef;
      our $SSL_KEY_FILE = undef;
      our $SSL_CERT_FILE = undef;
      our $SSL_CA_FILE = undef;
    
      # read config file
      if ( ! open( TMP, $conf_file) ) {
        die "Can't read config file '$conf_file': $!\n";
      }
      close TMP;
    
      # load set variables by user
      if ( !do $conf_file ) {
        die("Errors in config file '$conf_file': $@");
      }
    
      return ($URI, $SSL_KEY_FILE, $SSL_CERT_FILE, $SSL_CA_FILE);
    
    } # End of loadConf
    1;