From 0c8c0d882bd49986c849717227770bd3fabc3059 Mon Sep 17 00:00:00 2001 From: 404invalid-user Date: Thu, 21 Nov 2024 21:53:59 +0000 Subject: [PATCH] Add .env file support for HomeBox (#383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added .env file support added env file support using the homebox docs * Changed homebox note from warning to info * Homebox-Install: Add .env Support * Update homebox-install.sh --------- Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --- install/homebox-install.sh | 7 +++++++ json/homebox.json | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/install/homebox-install.sh b/install/homebox-install.sh index f0d1c8cd..6548e760 100644 --- a/install/homebox-install.sh +++ b/install/homebox-install.sh @@ -26,6 +26,12 @@ msg_info "Installing Homebox" RELEASE=$(curl -s https://api.github.com/repos/sysadminsmedia/homebox/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -qO- https://github.com/sysadminsmedia/homebox/releases/download/${RELEASE}/homebox_Linux_x86_64.tar.gz | tar -xzf - -C /opt chmod +x /opt/homebox +cat </opt/.env +# For possible environment variables check here: https://homebox.software/en/configure-homebox +HBOX_MODE=production +HBOX_WEB_PORT=7745 +HBOX_WEB_HOST=0.0.0.0 +EOF echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed Homebox" @@ -38,6 +44,7 @@ After=network.target [Service] WorkingDirectory=/opt ExecStart=/opt/homebox +EnvironmentFile=/opt/.env Restart=on-failure [Install] diff --git a/json/homebox.json b/json/homebox.json index d75856ab..cc55634d 100644 --- a/json/homebox.json +++ b/json/homebox.json @@ -30,5 +30,10 @@ "username": null, "password": null }, - "notes": [] -} \ No newline at end of file + "notes": [ + { + "text": "env file location: `/opt/.env`", + "type": "info" + } + ] +}