mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
Support multiple hba.conf files, for Debian
This commit is contained in:
@ -59,3 +59,4 @@ Fixed a bug that prevented the 'valid until' date from being displayed for exist
|
||||
---- Changes since 1.370 ----
|
||||
Added an option on the backup form to create the destination directory if missing.
|
||||
Re-wrote the backup form to use the new Webmin UI library.
|
||||
Improved support for Debian/Ubuntu systems that can have different PostgreSQL versions.
|
||||
|
@ -5,7 +5,7 @@ do 'postgresql-lib.pl';
|
||||
# Returns files and directories that can be backed up
|
||||
sub backup_config_files
|
||||
{
|
||||
return ( $config{'hba_conf'} );
|
||||
return ( $hba_conf_file );
|
||||
}
|
||||
|
||||
# pre_backup(&files)
|
||||
|
@ -1,12 +1,12 @@
|
||||
hba_conf=/etc/postgresql/7.4/main/pg_hba.conf
|
||||
hba_conf=/etc/postgresql/7.4/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf
|
||||
psql=/usr/bin/psql
|
||||
start_cmd=/etc/init.d/postgresql-7.4 start
|
||||
start_cmd=if [ -r /etc/init.d/postgresql-7.4 ]; then /etc/init.d/postgresql-7.4 start; else /etc/init.d/postgresql-8.2 start; fi
|
||||
basedb=template1
|
||||
perpage=25
|
||||
plib=
|
||||
pass=
|
||||
login=postgres
|
||||
stop_cmd=/etc/init.d/postgresql-7.4 stop
|
||||
stop_cmd=if [ -r /etc/init.d/postgresql-7.4 ]; then /etc/init.d/postgresql-7.4 stop; else /etc/init.d/postgresql-8.2 stop; fi
|
||||
pid_file=/var/run/postmaster.pid
|
||||
nodbi=0
|
||||
dump_cmd=/usr/bin/pg_dump
|
||||
|
@ -20,7 +20,7 @@ start_cmd=Command to start PostgreSQL,0
|
||||
stop_cmd=Command to stop PostgreSQL,3,Kill process
|
||||
setup_cmd=Command to initialize PostgreSQL,3,None
|
||||
pid_file=Path to postmaster PID file,8
|
||||
hba_conf=Path to host access config file,8
|
||||
hba_conf=Paths to host access config file,9,60,3,\t
|
||||
host=PostgreSQL host to connect to,3,localhost
|
||||
port=PostgreSQL port to connect to,3,Default
|
||||
dump_cmd=Path to pg_dump command,0
|
||||
|
@ -20,7 +20,6 @@ start_cmd=Ordre per iniciar PostgreSQL,0
|
||||
stop_cmd=Ordre per aturar PostgreSQL,3,Mata el proc<6F>s
|
||||
setup_cmd=Ordre per inicialitzar PostgreSQL,3,Cap
|
||||
pid_file=Cam<61> del fitxer de PID de postmaster,8
|
||||
hba_conf=Cam<61> del fitxer de configuraci<63> d'acc<63>s a hosts,8
|
||||
host=Host PostgreSQL a connectar,3,localhost
|
||||
port=Port PostgreSQL a connectar,3,Defecte
|
||||
dump_cmd=Cam<61> de l'ordre pg_dump,0
|
||||
|
@ -3,7 +3,6 @@ basedb=Anfängliche PostgreSQL-Datenbank,0
|
||||
blob_mode=Zeige Blob- und Textfelder als,1,0-Daten in der Tabelle,1-Zu downloadende Verbindungen
|
||||
date_subs=Verwende <tt>strftime</tt> als Ersatz der Backup-Speicherorte?,1,1-Ja,0-Nein
|
||||
dump_cmd=Pfad zu <tt>pg_dump</tt>,0
|
||||
hba_conf=Pfad zur Host-Zugriff-Konfigurationsdatei,0
|
||||
host=Verbinde zu PostgreSQL-Host,3,Localhost
|
||||
line1=Konfigurierbare Options,11
|
||||
line2=Systemkonfiguration,11
|
||||
|
@ -6,7 +6,6 @@ basedb=Base de datos inicial de PostgreSQL,0
|
||||
start_cmd=Comando para arrancar PostgreSQL,0
|
||||
stop_cmd=Comando para parar PostgreSQL,3,Matar proceso
|
||||
pid_file=Trayectoria a archivo PID del jefe de estafeta de correos,0
|
||||
hba_conf=Trayectoria archivo de configuraci<EFBFBD>n de acceso de m<EFBFBD>quinas,0
|
||||
perpage=N<EFBFBD>mero de filas a mostrar por p<EFBFBD>gina,0
|
||||
host=M<EFBFBD>quina PostgreSQL a conectarse,3,Local
|
||||
unix=Usuario de Unix como el que ejecutar los comandos de PostgreSQL,3,root
|
||||
|
@ -16,7 +16,6 @@ start_cmd=Commande pour démarrer PostgreSQL,0
|
||||
stop_cmd=Commande pour arrêter PostgreSQL,3,Tuer le processus
|
||||
setup_cmd=Commande pour initialiser PostgreSQL,3,Aucune
|
||||
pid_file=Chemin d'accès au fichier PID du postmaster,0
|
||||
hba_conf=Chemin d'accès au fichier de configuration d'accès aux hôtes,0
|
||||
host=Hôte PostgreSQL auquel se connecter,3,localhost
|
||||
port=Port PostgreSQL auquel se connecter,3,Par défaut
|
||||
dump_cmd=Chemin d'accès à la commande pg_dump,0
|
||||
|
@ -1,4 +1,3 @@
|
||||
hba_conf=pg_hba.confファイル,0
|
||||
start_cmd=PostgreSQL起動コマンド,0
|
||||
rstr_cmd=pg_restore コマンドのパス,0
|
||||
plib=PostgreSQL シェアードライブラリ,3,必要無し
|
||||
|
@ -15,7 +15,6 @@ start_cmd=PostgreSQL
|
||||
stop_cmd=PostgreSQL<51><4C><EFBFBD>ߥ<EFBFBD><DFA5>ޥ<EFBFBD><DEA5><EFBFBD>,3,Kill <20>ץ<EFBFBD><D7A5><EFBFBD><EFBFBD><EFBFBD>
|
||||
setup_cmd=PostgreSQL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޥ<EFBFBD><DEA5><EFBFBD>,3,̵<><CCB5>
|
||||
pid_file=postmaster PID <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>,0
|
||||
hba_conf=pg_hba.conf<6E>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>,0
|
||||
host=PostgreSQL<51><4C>³<EFBFBD>ۥ<EFBFBD><DBA5><EFBFBD>,3,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۥ<EFBFBD><DBA5><EFBFBD>
|
||||
port=PostgreSQL<51><4C><EFBFBD><EFBFBD>³<EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD>,3,<2C>ǥե<C7A5><D5A5><EFBFBD><EFBFBD><EFBFBD>
|
||||
dump_cmd=pg_dump <20><><EFBFBD>ޥ<EFBFBD><DEA5>ɤΥѥ<CEA5>,0
|
||||
|
@ -1,4 +1,3 @@
|
||||
hba_conf=호스트 접근 설정 파일 경로,8
|
||||
start_cmd=PostgreSQL 시작 명령,0
|
||||
rstr_cmd=pg_restore 명령 경로,0
|
||||
plib=PostgreSQL 공유 라이브러리 경로,3,필요 없음
|
||||
|
@ -20,7 +20,6 @@ start_cmd=PostgreSQL
|
||||
stop_cmd=PostgreSQL <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>,3,<2C><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
setup_cmd=PostgreSQL <20>ʱ<EFBFBD>ȭ <20><><EFBFBD><EFBFBD>,3,<2C><><EFBFBD><EFBFBD>
|
||||
pid_file=postmaster PID <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>,8
|
||||
hba_conf=ȣ<><C8A3>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>,8
|
||||
host=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PostgreSQL ȣ<><C8A3>Ʈ,3,localhost
|
||||
port=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PostgreSQL <20><>Ʈ,3,<2C>⺻
|
||||
dump_cmd=pg_dump <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>,0
|
||||
|
@ -6,6 +6,5 @@ basedb=Pocz
|
||||
start_cmd=Polecenie uruchamiaj<EFBFBD>ce PostgreSQLa,0
|
||||
stop_cmd=Polecenie zatrzymuj<EFBFBD>ce PostgreSQLa,3,Zabicie procesu
|
||||
pid_file=<EFBFBD>cie<EFBFBD>ka z numerem PID procesu <tt>postmaster</tt>,0
|
||||
hba_conf=<EFBFBD>cie<EFBFBD>ka do pliku konfiguracyjnego dost<EFBFBD>pu host<EFBFBD>w,0
|
||||
perpage=Ilo<EFBFBD><EFBFBD> linii wy<EFBFBD>wietlanych na stronie,0
|
||||
host=Host PostgreSQLa, z kt<6B>rym si<73> <20><>czy<7A>,3,Localhost
|
||||
|
@ -11,6 +11,5 @@ start_cmd=
|
||||
stop_cmd=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PostgreSQL,3,<2C><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
setup_cmd=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PostgreSQL,3,<2C><><EFBFBD>
|
||||
pid_file=<3D><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> PID postmaster,0
|
||||
hba_conf=<3D><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>,0
|
||||
host=<3D><><EFBFBD><EFBFBD> PostgreSQL <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,3,localhost
|
||||
unix=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> unix, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PostgreSQL,3,root
|
||||
|
@ -6,6 +6,5 @@ basedb=PostgreSQL-databas att starta med,0
|
||||
start_cmd=Kommando f<EFBFBD>r att starta PostgreSQL,0
|
||||
stop_cmd=Kommando f<EFBFBD>r att stanna PostgreSQL,3,D<EFBFBD>da processen
|
||||
pid_file=S<EFBFBD>kv<EFBFBD>g till postmaster-PID-fil,0
|
||||
hba_conf=S<EFBFBD>kv<EFBFBD>g till konfigurationsfil f<EFBFBD>r datortillg<EFBFBD>ng,0
|
||||
perpage=Antal rader som ska visas per sida,0
|
||||
host=PostgreSQL-dator att koppla upp mot,3,Localhost
|
||||
|
@ -20,7 +20,6 @@ start_cmd=Command to start PostgreSQL,0
|
||||
stop_cmd=Command to stop PostgreSQL,3,Kill process
|
||||
setup_cmd=Command to initialize PostgreSQL,3,None
|
||||
pid_file=Path to postmaster PID file,0
|
||||
hba_conf=Path to host access config file,0
|
||||
host=PostgreSQL host to connect to,3,localhost
|
||||
port=PostgreSQL port to connect to,3,Default
|
||||
dump_cmd=Path to pg_dump command,0
|
||||
|
@ -1,4 +1,3 @@
|
||||
hba_conf=<3D><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0
|
||||
start_cmd=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PostgreSQL,0
|
||||
plib=<3D><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PostgreSQL,3,<2C><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
pass=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,12
|
||||
|
@ -6,5 +6,4 @@ basedb=
|
||||
start_cmd=<3D><><EFBFBD><EFBFBD> PostgreSQL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0
|
||||
stop_cmd=ֹͣ PostgreSQL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,3,<2C>رս<D8B1><D5BD><EFBFBD>
|
||||
pid_file=postmaster <20><><EFBFBD>̱<EFBFBD>ʶ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>·<EFBFBD><C2B7>,0
|
||||
hba_conf=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>,0
|
||||
perpage=ÿҳ<C3BF><D2B3>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0
|
||||
|
@ -1,4 +1,3 @@
|
||||
hba_conf=主机访问配置文件路径,0
|
||||
start_cmd=启动 PostgreSQL 的命令,0
|
||||
perpage=每页显示的行数,0
|
||||
plib=PostgreSQL 共享库路径,3,不需要
|
||||
|
@ -6,7 +6,6 @@ basedb=
|
||||
start_cmd=<3D>Ұ<EFBFBD> PostgreSQL <20><><EFBFBD>R<EFBFBD>O,0
|
||||
stop_cmd=<3D><><EFBFBD><EFBFBD> PostgreSQL <20><><EFBFBD>R<EFBFBD>O,3,<2C><><EFBFBD><EFBFBD><EFBFBD>{<7B><>
|
||||
pid_file=postmaster PID<49>ɮ<C9AE><D7B8>|,0
|
||||
hba_conf=<3D>D<EFBFBD><44><EFBFBD>i<EFBFBD>J<EFBFBD>t<EFBFBD>m<EFBFBD>ɮ<C9AE><D7B8>|,0
|
||||
perpage=<3D>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>ܪ<EFBFBD><DCAA><EFBFBD><EFBFBD><EFBFBD>,0
|
||||
host=PostgreSQL<51>D<EFBFBD><44><EFBFBD>s<EFBFBD>u<EFBFBD><75>,3,<2C><><EFBFBD>a<EFBFBD><61>
|
||||
unix=<3D><><EFBFBD><EFBFBD>PostgreSQL<51><4C><EFBFBD>O<EFBFBD><4F>Unix<69>ϥΪ<CFA5>,3,root
|
||||
|
@ -1,4 +1,3 @@
|
||||
hba_conf=主機進入配置檔案路徑,0
|
||||
start_cmd=啟動 PostgreSQL 的命令,0
|
||||
host=PostgreSQL主機連線到,3,本地端
|
||||
perpage=每頁顯示的行數,0
|
||||
|
@ -6,11 +6,11 @@ require './postgresql-lib.pl';
|
||||
&ReadParse();
|
||||
$access{'users'} || &error($text{'host_ecannot'});
|
||||
|
||||
&lock_file($config{'hba_conf'});
|
||||
&lock_file($hba_conf_file);
|
||||
@hosts = &get_hba_config();
|
||||
$host = $hosts[$in{'idx'}];
|
||||
&swap_hba($host, $hosts[$in{'idx'}+1]);
|
||||
&unlock_file($config{'hba_conf'});
|
||||
&unlock_file($hba_conf_file);
|
||||
&restart_postgresql();
|
||||
&webmin_log('move', 'hba',
|
||||
$host->{'type'} eq 'local' ? 'local' :
|
||||
|
@ -23,12 +23,13 @@ if (!-x $config{'psql'} || -d $config{'psql'}) {
|
||||
}
|
||||
|
||||
# Check for the config file
|
||||
if (!-r $config{'hba_conf'}) {
|
||||
if (!-r $hba_conf_file) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
|
||||
&help_search_link("postgresql", "man", "doc", "google"));
|
||||
($hba_conf_file) = split(/\t+/, $config{'hba_conf'});
|
||||
if ($config{'setup_cmd'}) {
|
||||
# Offer to setup DB for first time
|
||||
print &text('index_setup', "<tt>$config{'hba_conf'}</tt>",
|
||||
print &text('index_setup', "<tt>$hba_conf_file</tt>",
|
||||
"<tt>$config{'setup_cmd'}</tt>"),"<p>\n";
|
||||
print "<form action=setup.cgi><center>\n";
|
||||
print "<input type=submit value='$text{'index_setupok'}'>\n";
|
||||
@ -36,7 +37,7 @@ if (!-r $config{'hba_conf'}) {
|
||||
}
|
||||
else {
|
||||
# Config file wasn't found
|
||||
print &text('index_ehba', "<tt>$config{'hba_conf'}</tt>",
|
||||
print &text('index_ehba', "<tt>$hba_conf_file</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
|
@ -11,7 +11,7 @@ sub is_installed
|
||||
return 0 if (!-x $config{'psql'});
|
||||
if ($_[0]) {
|
||||
# Check for .conf and if can login
|
||||
return 1 if (!-r $config{'hba_conf'});
|
||||
return 1 if (!-r $hba_conf_file);
|
||||
return 2 if (&is_postgresql_running() == 1);
|
||||
}
|
||||
return 1;
|
||||
|
@ -44,6 +44,12 @@ else {
|
||||
}
|
||||
$max_dbs = $config{'max_dbs'};
|
||||
}
|
||||
foreach my $hba (split(/\t+/, $config{'hba_conf'})) {
|
||||
if (-r $hba) {
|
||||
$hba_conf_file = $hba;
|
||||
last;
|
||||
}
|
||||
}
|
||||
$cron_cmd = "$module_config_directory/backup.pl";
|
||||
|
||||
if (!$config{'nodbi'}) {
|
||||
@ -517,7 +523,7 @@ else {
|
||||
sub get_hba_config
|
||||
{
|
||||
local $lnum = 0;
|
||||
open(HBA, $config{'hba_conf'});
|
||||
open(HBA, $hba_conf_file);
|
||||
while(<HBA>) {
|
||||
s/\r|\n//g;
|
||||
s/^\s*#.*$//g;
|
||||
@ -587,7 +593,7 @@ return @rv;
|
||||
# create_hba(&hba, version)
|
||||
sub create_hba
|
||||
{
|
||||
local $lref = &read_file_lines($config{'hba_conf'});
|
||||
local $lref = &read_file_lines($hba_conf_file);
|
||||
push(@$lref, &hba_line($_[0], $_[1]));
|
||||
&flush_file_lines();
|
||||
}
|
||||
@ -595,7 +601,7 @@ push(@$lref, &hba_line($_[0], $_[1]));
|
||||
# delete_hba(&hba, version)
|
||||
sub delete_hba
|
||||
{
|
||||
local $lref = &read_file_lines($config{'hba_conf'});
|
||||
local $lref = &read_file_lines($hba_conf_file);
|
||||
splice(@$lref, $_[0]->{'line'}, 1);
|
||||
&flush_file_lines();
|
||||
}
|
||||
@ -603,7 +609,7 @@ splice(@$lref, $_[0]->{'line'}, 1);
|
||||
# modify_hba(&hba, version)
|
||||
sub modify_hba
|
||||
{
|
||||
local $lref = &read_file_lines($config{'hba_conf'});
|
||||
local $lref = &read_file_lines($hba_conf_file);
|
||||
splice(@$lref, $_[0]->{'line'}, 1, &hba_line($_[0], $_[1]));
|
||||
&flush_file_lines();
|
||||
}
|
||||
@ -611,7 +617,7 @@ splice(@$lref, $_[0]->{'line'}, 1, &hba_line($_[0], $_[1]));
|
||||
# swap_hba(&hba1, &hba2)
|
||||
sub swap_hba
|
||||
{
|
||||
local $lref = &read_file_lines($config{'hba_conf'});
|
||||
local $lref = &read_file_lines($hba_conf_file);
|
||||
local $line0 = $lref->[$_[0]->{'line'}];
|
||||
local $line1 = $lref->[$_[1]->{'line'}];
|
||||
$lref->[$_[1]->{'line'}] = $line0;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
require './postgresql-lib.pl';
|
||||
&ReadParse();
|
||||
&lock_file($config{'hba_conf'});
|
||||
&lock_file($hba_conf_file);
|
||||
$v = &get_postgresql_version();
|
||||
@all = &get_hba_config($v);
|
||||
$host = $all[$in{'idx'}] if (!$in{'new'});
|
||||
@ -94,7 +94,7 @@ else {
|
||||
&modify_hba($host, $v);
|
||||
}
|
||||
}
|
||||
&unlock_file($config{'hba_conf'});
|
||||
&unlock_file($hba_conf_file);
|
||||
&restart_postgresql();
|
||||
&webmin_log($in{'new'} ? 'create' : $in{'delete'} ? 'delete' : 'modify',
|
||||
'hba', $host->{'type'} eq 'local' ? 'local' :
|
||||
|
@ -6,11 +6,11 @@ require './postgresql-lib.pl';
|
||||
&ReadParse();
|
||||
$access{'users'} || &error($text{'host_ecannot'});
|
||||
|
||||
&lock_file($config{'hba_conf'});
|
||||
&lock_file($hba_conf_file);
|
||||
@hosts = &get_hba_config();
|
||||
$host = $hosts[$in{'idx'}];
|
||||
&swap_hba($host, $hosts[$in{'idx'}-1]);
|
||||
&unlock_file($config{'hba_conf'});
|
||||
&unlock_file($hba_conf_file);
|
||||
&restart_postgresql();
|
||||
&webmin_log('move', 'hba',
|
||||
$host->{'type'} eq 'local' ? 'local' :
|
||||
|
Reference in New Issue
Block a user