#!/usr/local/bin/perl
# login.cgi
# Save PostgreSQL login and password

require './postgresql-lib.pl';
&ReadParse();
&error_setup($text{'login_err'});
$access{'noconfig'} && &error($text{'login_ecannot'});
$in{'login'} || &error($text{'login_elogin'});
$config{'login'} = $in{'login'};
$config{'pass'} = $in{'pass'};
if (&is_postgresql_running() == -1) {
	&error($text{'login_epass'});
	}
&write_file("$module_config_directory/config", \%config);
chmod(0700, "$module_config_directory/config");
&redirect("");

