Skip to content

Commit 461ab04

Browse files
committed
Update gendb.bat
1 parent 89eb56c commit 461ab04

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

generate/gendb.bat

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,22 @@ if not "!ec!"=="0" (
100100
endlocal & exit /b 1
101101
)
102102

103+
ping -n 3 127.0.0.1
104+
103105
:: После initdb: у initdb создаются собственные postgresql.conf/pg_hba.conf.
104-
del "%DATA_DIR%\pg_hba.conf" "%DATA_DIR%\postgresql.conf"
106+
for %%F in ("pg_hba.conf" "postgresql.conf") do (
107+
if exist "%DATA_DIR%\%%~F" (
108+
attrib -r -s -h "%DATA_DIR%\%%~F" >nul 2>nul
109+
del /f /q /a "%DATA_DIR%\%%~F" >nul 2>nul
110+
if exist "%DATA_DIR%\%%~F" (
111+
echo [WARN] Не удалось удалить: "%DATA_DIR%\%%~F"
112+
) else (
113+
echo [OK] Удалён: "%DATA_DIR%\%%~F"
114+
)
115+
) else (
116+
echo [INFO] Файл не найден: "%DATA_DIR%\%%~F"
117+
)
118+
)
105119

106120
:: Удаляем временный каталог
107121
if exist "%TMP_DIR%" rd /s /q "%TMP_DIR%"

0 commit comments

Comments
 (0)