From ad7d63eea716e44943a77310c2c1b3cc8e2cdddf Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Thu, 27 Apr 2023 16:14:58 +1000 Subject: [PATCH] update ulogger so it dosen't recreate everytime --- modules/nixos/ulogger.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nixos/ulogger.nix b/modules/nixos/ulogger.nix index f89783ca..a5599746 100644 --- a/modules/nixos/ulogger.nix +++ b/modules/nixos/ulogger.nix @@ -258,10 +258,10 @@ in echo "Setting up ulogger-server files in ${cfg.dataDir} ..." cd "${cfg.dataDir}" - cp -R ${cfg.package}/* ./ - cp ${configFile}/config.php ./ - if [ ! -f installed ]; then + cp -R ${cfg.package}/* ./ + cp ${configFile}/config.php ./ + echo "Install file not found, installing ..." psql -U ulogger < ${cfg.package}/scripts/ulogger.pgsql psql -d ulogger -c "INSERT INTO users (login, password, admin) VALUES ('$ULOGGER_ADMIN_USER', '$ULOGGER_ADMIN_PASSWORD', TRUE)"