tcms-hostname 433 B

123456789101112131415161718192021
  1. #!/usr/bin/env perl
  2. use strict;
  3. use warnings;
  4. use FindBin::libs;
  5. use Trog::Config();
  6. my $hostname = $ARGV[0];
  7. my $conf = Trog::Config->get();
  8. if ($hostname) {
  9. $conf->param('general.hostname', $hostname);
  10. $conf->save();
  11. }
  12. my $domain = $conf->param('general.hostname');
  13. die "Hostname not set in tCMS configuration. Please set this first by passing the hostname to bin/tcms-hostname." unless $domain;
  14. print "$domain\n";