From 8e0773688edb6a6aa474dd19fa2fd75277dcd678 Mon Sep 17 00:00:00 2001 From: Snorre Date: Sun, 6 Apr 2025 05:41:40 +0200 Subject: [PATCH] bad at bashj --- modules/config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/config.nix b/modules/config.nix index 354e931..5f7da76 100644 --- a/modules/config.nix +++ b/modules/config.nix @@ -142,12 +142,12 @@ in { '' mkdir -p ${path} # Make sure there is a database - if [ -z "${path}/${dbname}" ]; then + if [ ! -e "${path}/${dbname}" ]; then cp ${defaultDB} "${path}/${dbname}" fi maxIndex=$(${sq} 'SELECT InternalId FROM Users ORDER BY InternalId DESC LIMIT 1') - if [ -n "$maxIndex" ]; then + if [ -z "$maxIndex" ]; then maxIndex="1" fi