From e78e51297ad0be88ed9543f96340c496be907a19 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Thu, 18 Dec 2025 06:14:10 +0000 Subject: fix: don't fail the script if the user karakeep already exists. fixes #2242 --- karakeep-linux.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/karakeep-linux.sh b/karakeep-linux.sh index e40babfe..d41a48da 100644 --- a/karakeep-linux.sh +++ b/karakeep-linux.sh @@ -272,8 +272,12 @@ EOF msg_done "Configuration complete" msg_start "Creating users and modifying permissions..." - useradd -U -s /usr/sbin/nologin -r -m -d "$M_DATA_DIR" meilisearch - useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" karakeep + if ! id -u meilisearch >/dev/null 2>&1; then + useradd -U -s /usr/sbin/nologin -r -m -d "$M_DATA_DIR" meilisearch + fi + if ! id -u karakeep >/dev/null 2>&1; then + useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" karakeep + fi chown meilisearch:meilisearch "$M_CONFIG_FILE" touch "$LOG_DIR"/{karakeep-workers.log,karakeep-web.log} chown -R karakeep:karakeep "$INSTALL_DIR" "$CONFIG_DIR" "$DATA_DIR" "$LOG_DIR" -- cgit v1.2.3-70-g09d2