Update .env file location in hoarder.sh

No more need to move around the .env file
This commit is contained in:
MahrWe 2025-01-08 14:31:08 +01:00 committed by GitHub
parent 9533bc88b3
commit 0ad212400c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,6 @@ function update_script() {
msg_ok "Stopped Services" msg_ok "Stopped Services"
msg_info "Updating ${APP} to v${RELEASE}" msg_info "Updating ${APP} to v${RELEASE}"
cd /opt cd /opt
mv /opt/hoarder/.env /opt/.env
rm -rf /opt/hoarder rm -rf /opt/hoarder
wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip"
unzip -q v${RELEASE}.zip unzip -q v${RELEASE}.zip
@ -54,8 +53,7 @@ function update_script() {
export DATA_DIR=/opt/hoarder_data export DATA_DIR=/opt/hoarder_data
cd /opt/hoarder/packages/db cd /opt/hoarder/packages/db
pnpm migrate &>/dev/null pnpm migrate &>/dev/null
mv /opt/.env /opt/hoarder/.env sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env
msg_ok "Updated ${APP} to v${RELEASE}" msg_ok "Updated ${APP} to v${RELEASE}"
msg_info "Starting Services" msg_info "Starting Services"
@ -79,4 +77,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"