From 78af7f7a6ad11248d17c6e4f51acf32b310378b9 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Thu, 23 Apr 2026 20:39:07 +0000 Subject: [PATCH] install.sh: fix hang at 'Starting inboxer service' by adding ReadWritePaths and start timeout - Add ReadWritePaths=/opt/inboxer/data /opt/inboxer/logs to the systemd unit so ProtectSystem=full doesn't block SQLite DB and log file creation - Wrap systemctl start with timeout 30s so the script never hangs forever if the service start job blocks --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index baeba4e..90dc85e 100755 --- a/install.sh +++ b/install.sh @@ -162,6 +162,9 @@ ProtectSystem=full ProtectHome=true PrivateTmp=true +# Data and logs directories need write access (overrides ProtectSystem=full) +ReadWritePaths=${DATA_DIR} ${LOGS_DIR} + [Install] WantedBy=multi-user.target UNITEOF @@ -182,8 +185,8 @@ systemctl daemon-reload info "Enabling ${SERVICE_NAME} service (starts on boot)..." systemctl enable "${SERVICE_NAME}" -info "Starting ${SERVICE_NAME} service..." -systemctl start "${SERVICE_NAME}" +info "Starting ${SERVICE_NAME} service (with 30s timeout)..." +timeout 30 systemctl start "${SERVICE_NAME}" || warn "'systemctl start ${SERVICE_NAME}' timed out or failed — the service may need manual investigation" # Brief pause so the service can initialise sleep 2