Files
ProxmoxVE/install/homebox-install.sh
T

52 lines
1.2 KiB
Bash
Raw Normal View History

2024-09-16 13:18:55 +02:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck
2024-09-16 13:18:55 +02:00
# Author: tteck
# Co-Author: MickLesk (Canbiz)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
2024-09-16 13:18:55 +02:00
# Source: https://github.com/sysadminsmedia/homebox
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2024-09-16 13:18:55 +02:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "homebox" "sysadminsmedia/homebox" "prebuild" "latest" "/opt/homebox" "homebox_Linux_$(arch_resolve "x86_64" "arm64").tar.gz"
2025-07-29 15:06:52 +02:00
msg_info "Configuring Homebox"
chmod +x /opt/homebox/homebox
2026-10-03 08:19:10 +02:00
AUTH_KEY="$(random_password 32)"
2025-07-29 15:06:52 +02:00
cat <<EOF >/opt/homebox/.env
2024-11-21 21:53:59 +00:00
# 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
2026-06-13 20:40:19 +02:00
HBOX_AUTH_API_KEY_PEPPER=${AUTH_KEY}
2024-11-21 21:53:59 +00:00
EOF
2025-07-29 15:06:52 +02:00
msg_ok "Configured Homebox"
2024-09-16 13:18:55 +02:00
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/homebox.service
[Unit]
Description=Start Homebox Service
After=network.target
[Service]
2025-07-29 15:06:52 +02:00
WorkingDirectory=/opt/homebox
ExecStart=/opt/homebox/homebox
EnvironmentFile=/opt/homebox/.env
2024-09-16 13:18:55 +02:00
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
2025-04-01 20:22:40 +02:00
systemctl enable -q --now homebox
2024-09-16 13:18:55 +02:00
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc