2025-11-02 23:49:54 -08:00
|
|
|
#!/usr/bin/env bash
|
2025-04-01 10:25:46 +02:00
|
|
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
2025-12-14 23:56:45 +01:00
|
|
|
# Author: MickLesk (CanbiZ) | Co-Author: CrazyWolf13
|
2024-12-16 12:42:51 +01:00
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
|
|
|
# Source: https://homarr.dev/
|
2023-08-16 08:57:18 -04:00
|
|
|
|
2025-05-14 16:52:46 +02:00
|
|
|
APP="homarr"
|
2025-04-10 11:56:52 +02:00
|
|
|
var_tags="${var_tags:-arr;dashboard}"
|
2025-12-14 23:56:45 +01:00
|
|
|
var_cpu="${var_cpu:-2}"
|
|
|
|
|
var_ram="${var_ram:-1024}"
|
2025-04-10 11:56:52 +02:00
|
|
|
var_disk="${var_disk:-8}"
|
|
|
|
|
var_os="${var_os:-debian}"
|
Bump K to H-Scripts to Debian 13 (Trixie) (#8597)
* Update scripts to use Debian 13 and improve update logic
Bump default container OS version from Debian 12 to 13 across multiple LXC setup scripts. Refactor update_script functions for consistency, improve messaging, and standardize apt usage. Update Kimai install and update scripts to use setup_php, setup_composer, and fetch_and_deploy_gh_release helpers, and switch from MySQL to MariaDB. Update Kometa to use Python 3.13. Minor improvements to backup, cleanup, and service management steps in several scripts.
* Refactor install scripts: unify cleanup and apt usage
Replaces repeated apt-get commands with apt for installing dependencies, and consolidates cleanup steps into a single cleanup_lxc function across all install scripts. Also updates repository setup to use setup_deb822_repo where applicable, and makes minor improvements to dependency installation and service setup.
* Update default Debian version to 13 and refactor updates
Set the default Debian version to 13 across all container scripts. Standardize apt command usage by replacing 'apt-get' with 'apt' where appropriate. Remove redundant cleanup steps from update scripts and streamline update logic for consistency. Also, call 'cleanup_lxc' after 'update_script' in the build function.
* Update default OS version to Debian 13 in JSON configs
Updated the 'version' field from '12' to '13' for Debian-based install methods across multiple application JSON files. Also set default OS and version for inspircd. This ensures new containers use the latest supported Debian release.
* fix kimai Update Check
* grammar
* Correct typo in success message
* Fix typo in success message for update
* refactor
* fixed jenkins / improve komodo
---------
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-11-12 10:56:18 +01:00
|
|
|
var_version="${var_version:-13}"
|
2025-04-10 11:56:52 +02:00
|
|
|
var_unprivileged="${var_unprivileged:-1}"
|
2024-12-16 12:42:51 +01:00
|
|
|
|
|
|
|
|
header_info "$APP"
|
2023-08-16 08:57:18 -04:00
|
|
|
variables
|
|
|
|
|
color
|
|
|
|
|
catch_errors
|
|
|
|
|
|
|
|
|
|
function update_script() {
|
2024-12-16 12:42:51 +01:00
|
|
|
header_info
|
|
|
|
|
check_container_storage
|
|
|
|
|
check_container_resources
|
|
|
|
|
if [[ ! -d /opt/homarr ]]; then
|
|
|
|
|
msg_error "No ${APP} Installation Found!"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
2025-01-28 16:32:44 +01:00
|
|
|
|
2025-08-29 12:27:24 +02:00
|
|
|
if check_for_gh_release "homarr" "homarr-labs/homarr"; then
|
2025-02-14 12:09:35 +01:00
|
|
|
msg_info "Stopping Services (Patience)"
|
2024-12-16 12:42:51 +01:00
|
|
|
systemctl stop homarr
|
2025-12-14 23:56:45 +01:00
|
|
|
systemctl stop redis-server
|
2024-12-16 12:42:51 +01:00
|
|
|
msg_ok "Services Stopped"
|
2024-11-08 11:34:07 +01:00
|
|
|
|
2025-12-14 23:56:45 +01:00
|
|
|
if ! { grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr/.env 2>/dev/null || grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr.env 2>/dev/null; }; then
|
2025-12-15 17:56:55 +01:00
|
|
|
msg_info "Fixing old structure"
|
2025-12-19 22:43:40 +01:00
|
|
|
systemctl disable -q --now nginx
|
2025-12-15 17:56:55 +01:00
|
|
|
cp /opt/homarr/.env /opt/homarr.env
|
|
|
|
|
echo "REDIS_IS_EXTERNAL='true'" >> /opt/homarr.env
|
2025-12-19 22:43:40 +01:00
|
|
|
sed -i '/^\[Unit\]/a Requires=redis-server.service\nAfter=redis-server.service' /etc/systemd/system/homarr.service
|
2025-12-15 17:56:55 +01:00
|
|
|
sed -i 's|^ExecStart=.*|ExecStart=/opt/homarr/run.sh|' /etc/systemd/system/homarr.service
|
|
|
|
|
sed -i 's|^EnvironmentFile=.*|EnvironmentFile=-/opt/homarr.env|' /etc/systemd/system/homarr.service
|
|
|
|
|
chown -R redis:redis /appdata/redis
|
|
|
|
|
chmod 744 /appdata/redis
|
|
|
|
|
mkdir -p /etc/systemd/system/redis-server.service.d/
|
|
|
|
|
cat <<EOF >/etc/systemd/system/redis-server.service.d/override.conf
|
2025-12-14 23:56:45 +01:00
|
|
|
[Service]
|
|
|
|
|
ReadWritePaths=-/appdata/redis -/var/lib/redis -/var/log/redis -/var/run/redis -/etc/redis
|
|
|
|
|
EOF
|
2025-12-15 17:56:55 +01:00
|
|
|
systemctl daemon-reload
|
|
|
|
|
rm /opt/run_homarr.sh
|
|
|
|
|
msg_ok "Fixed old structure"
|
2025-12-14 23:56:45 +01:00
|
|
|
fi
|
2024-11-10 17:20:37 +01:00
|
|
|
|
2025-06-05 10:05:20 +02:00
|
|
|
msg_info "Updating Nodejs"
|
|
|
|
|
$STD apt update
|
|
|
|
|
$STD apt upgrade nodejs -y
|
|
|
|
|
msg_ok "Updated Nodejs"
|
|
|
|
|
|
|
|
|
|
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
|
2025-06-18 12:03:00 +02:00
|
|
|
setup_nodejs
|
2025-12-19 22:43:40 +01:00
|
|
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-debian-amd64.tar.gz"
|
2025-06-18 12:03:00 +02:00
|
|
|
|
2025-12-14 23:56:45 +01:00
|
|
|
msg_info "Updating Homarr"
|
|
|
|
|
cp /opt/homarr/redis.conf /etc/redis/redis.conf
|
2025-02-14 12:09:35 +01:00
|
|
|
rm /etc/nginx/nginx.conf
|
|
|
|
|
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
2025-12-14 23:56:45 +01:00
|
|
|
msg_ok "Updated Homarr"
|
2024-11-08 11:34:07 +01:00
|
|
|
|
2024-12-16 12:42:51 +01:00
|
|
|
msg_info "Starting Services"
|
2025-12-14 23:56:45 +01:00
|
|
|
chmod +x /opt/homarr/run.sh
|
2024-12-16 12:42:51 +01:00
|
|
|
systemctl start homarr
|
2025-12-14 23:56:45 +01:00
|
|
|
systemctl start redis-server
|
2024-12-16 12:42:51 +01:00
|
|
|
msg_ok "Started Services"
|
2025-10-30 09:24:16 -07:00
|
|
|
msg_ok "Updated successfully!"
|
2024-12-16 12:42:51 +01:00
|
|
|
fi
|
|
|
|
|
exit
|
2023-08-16 08:57:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
start
|
|
|
|
|
build_container
|
|
|
|
|
description
|
|
|
|
|
|
2026-01-06 22:57:40 +01:00
|
|
|
msg_ok "Completed successfully!\n"
|
2024-12-16 12:42:51 +01:00
|
|
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
|
|
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
2025-05-12 20:22:48 +02:00
|
|
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7575${CL}"
|