diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-04-29 22:25:21 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-04-29 22:25:21 +0200 |
commit | cdfdcfe2c98d1abea9bc87f8fccae0e1b3c47b3e (patch) | |
tree | b987eb2ad642059dedd1cef666250136b8304f03 /src | |
parent | cmd_line: read executable name from /proc/self/exe (diff) | |
download | cimple-cdfdcfe2c98d1abea9bc87f8fccae0e1b3c47b3e.tar.gz cimple-cdfdcfe2c98d1abea9bc87f8fccae0e1b3c47b3e.zip |
add a default SQLite database path
Diffstat (limited to '')
-rw-r--r-- | src/const.h | 1 | ||||
-rw-r--r-- | src/server_main.c | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/const.h b/src/const.h index f5a2b99..c762dbe 100644 --- a/src/const.h +++ b/src/const.h @@ -12,6 +12,7 @@ #define DEFAULT_HOST "127.0.0.1" #endif #define DEFAULT_PORT "5556" +#define DEFAULT_SQLITE_PATH "/var/lib/cimple/cimple.sqlite" #define CMD_CI_RUN "run" #define CMD_NEW_WORKER "new-worker" diff --git a/src/server_main.c b/src/server_main.c index cdd73b3..332ae17 100644 --- a/src/server_main.c +++ b/src/server_main.c @@ -13,7 +13,7 @@ static struct settings default_settings() { - struct settings settings = {DEFAULT_PORT, NULL}; + struct settings settings = {DEFAULT_PORT, DEFAULT_SQLITE_PATH}; return settings; } @@ -56,11 +56,6 @@ static int parse_settings(struct settings *settings, int argc, char *argv[]) } } - if (!settings->sqlite_path) { - exit_with_usage_err("must specify the path to a SQLite database"); - return -1; - } - return 0; } |