Add .env file support for HomeBox (#383)

* 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>
This commit is contained in:
404invalid-user 2024-11-21 21:53:59 +00:00 committed by GitHub
parent 51c4d3f000
commit 0c8c0d882b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View File

@ -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 <<EOF >/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]

View File

@ -30,5 +30,10 @@
"username": null,
"password": null
},
"notes": []
}
"notes": [
{
"text": "env file location: `/opt/.env`",
"type": "info"
}
]
}