Files
ProxmoxVE/install/homebox-install.sh

54 lines
1.2 KiB
Bash
Raw Normal View History

2024-09-16 13:18:55 +02:00
#!/usr/bin/env bash
# Copyright (c) 2021-2025 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_x86_64.tar.gz"
msg_info "Configuring Homebox"
chmod +x /opt/homebox/homebox
cat <<EOF >/opt/homebox/.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
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]
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
systemctl enable -q --now homebox
2024-09-16 13:18:55 +02:00
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"