diff options
author | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2025-04-13 07:18:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-13 07:18:45 +0200 |
commit | 4ea3a099b05fa910498bfbf1b2d7387118355472 (patch) | |
tree | c248cf6764412471ee3e0d1218761bee19fb396a /web/api/public/config | |
parent | 09710c061d5b8ae86b3dfe49f4b8936c13a10535 (diff) |
Diffstat (limited to 'web/api/public/config')
-rwxr-xr-x | web/api/public/config | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/web/api/public/config b/web/api/public/config deleted file mode 100755 index 0f0d322..0000000 --- a/web/api/public/config +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/perl -# vim:ts=8:sw=8 - -use DBI; -use lib '/opt/gondul/include'; -use nms; -use nms::web; -use strict; -use warnings; -use Data::Dumper; - -$nms::web::cc{'max-age'} = "3600"; - -my $hostname = $ENV{'HTTP_HOST'} || ""; -my $q2 = $nms::web::dbh->prepare('select id, publicvhost, shortname, data from config order by id desc limit 1;'); - -$q2->execute(); -$nms::web::json{'config'}{'data'} = 0; -$nms::web::json{'config'}{'shortname'} = "notset"; -$nms::web::json{'config'}{'publicvhost'} = "notset"; -while (my $ref = $q2->fetchrow_hashref()) { - $nms::web::json{'config'} = $ref; - $nms::web::json{'config'}{'data'} = JSON::XS::decode_json($ref->{'data'}); - if ($ref->{'publicvhost'} eq $hostname) { - $nms::web::json{'config'}{'public'} = "true"; - } else { - $nms::web::json{'config'}{'public'} = "false"; - } -} - -finalize_output(); |