add initdb command
This commit is contained in:
2
lib.nix
2
lib.nix
@@ -105,7 +105,7 @@ in
|
|||||||
script = pkgs.writeShellApplication {
|
script = pkgs.writeShellApplication {
|
||||||
name = "run-postgres";
|
name = "run-postgres";
|
||||||
text = ''
|
text = ''
|
||||||
if [! -d "${data_dir}"]; then
|
if [ ! -d "${data_dir}" ]; then
|
||||||
echo "Database directory does not exist. Initializing"
|
echo "Database directory does not exist. Initializing"
|
||||||
initdb -D ${data_dir}
|
initdb -D ${data_dir}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user