A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
build: Add logs to the linux installation script
Mohamed Bassem4862bbcefd23
diff --git a/hoarder-linux.sh b/hoarder-linux.shindex 930863f0..c2a52283 100644--- a/hoarder-linux.sh+++ b/hoarder-linux.sh@@ -9,6 +9,7 @@ OS="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )"INSTALL_DIR=/opt/hoarderexport DATA_DIR=/var/lib/hoarderCONFIG_DIR=/etc/hoarder+LOG_DIR=/var/log/hoarderENV_FILE=${CONFIG_DIR}/hoarder.envfunction install {@@ -49,6 +50,7 @@ function install {echo "Installing Hoarder..."mkdir -p $DATA_DIRmkdir -p $CONFIG_DIR+ mkdir -p $LOG_DIRM_DATA_DIR=/var/lib/meilisearchM_CONFIG_FILE=/etc/meilisearch.tomlRELEASE=$(curl -s https://api.github.com/repos/hoarder-app/hoarder/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')@@ -109,7 +111,7 @@ EOFuseradd -U -s /usr/sbin/nologin -r -m -d "${M_DATA_DIR}" meilisearchuseradd -U -s /usr/sbin/nologin -r -M -d "${INSTALL_DIR}" hoarderchown meilisearch:meilisearch "${M_CONFIG_FILE}"- chown -R hoarder:hoarder "${INSTALL_DIR}" "${CONFIG_DIR}" "${DATA_DIR}"+ chown -R hoarder:hoarder "${INSTALL_DIR}" "${CONFIG_DIR}" "${DATA_DIR}" "${LOG_DIR}"echo "Users created, permissions modified" && sleep 1echo "Creating service files..."@@ -177,6 +179,8 @@ Restart=alwaysEnvironmentFile=${ENV_FILE}WorkingDirectory=${INSTALL_DIR}/apps/workersExecStart=/usr/bin/pnpm run start:prod+StandardOutput=file:${LOG_DIR}/hoarder-workers.log+StandardError=file:${LOG_DIR}/hoarder-workers.logTimeoutStopSec=5SyslogIdentifier=hoarder-workers@@ -197,6 +201,8 @@ Restart=on-failureEnvironmentFile=${ENV_FILE}WorkingDirectory=${INSTALL_DIR}/apps/webExecStart=/usr/bin/pnpm start+StandardOutput=file:${LOG_DIR}/hoarder-web.log+StandardError=file:${LOG_DIR}/hoarder-web.logTimeoutStopSec=5SyslogIdentifier=hoarder-web