add initdb command

This commit is contained in:
2025-03-16 00:49:03 +04:00
parent a68ee5fe04
commit 3c860225e6

View File

@@ -105,7 +105,7 @@ in
script = pkgs.writeShellApplication {
name = "run-postgres";
text = ''
if [! -d "${data_dir}"]; then
if [ ! -d "${data_dir}" ]; then
echo "Database directory does not exist. Initializing"
initdb -D ${data_dir}
fi