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