summaryrefslogtreecommitdiff
path: root/authtoken.json
diff options
context:
space:
mode:
Diffstat (limited to 'authtoken.json')
-rwxr-xr-xauthtoken.json12
1 files changed, 11 insertions, 1 deletions
diff --git a/authtoken.json b/authtoken.json
index 971b12e..2f00e57 100755
--- a/authtoken.json
+++ b/authtoken.json
@@ -2,8 +2,16 @@
use strict;
use warnings;
+use Config::IniFiles;
+
+
+my $RD_CONF = "/etc/rd.conf";
+my $cfg = Config::IniFiles->new(-file => $RD_CONF);
+my $dbhost = $cfg->val('mySQL', 'Hostname');
+my $dbname = $cfg->val('mySQL', 'Database');
+my $dbuser = $cfg->val('mySQL', 'Loginname');
+my $dbpasswd = $cfg->val('mySQL', 'Password');
-print "Content-type: application/json\n\n";
my $status = 'ERROR';
my $errorstring = 'unknown';
@@ -18,6 +26,8 @@ if(defined $ENV{REMOTE_USER}) {
$errorstring = 'no username defined';
}
+print "Content-type: application/json\n\n";
+
print "{\n";
print " 'status': '" . $status . "',\n";
print " 'errorstring': '" . $errorstring . "',\n";