fix redis

This commit is contained in:
Tobias 2025-12-14 15:49:44 +01:00
parent 34dda4752b
commit 2e2300865e

View File

@ -40,6 +40,7 @@ function update_script() {
msg_info "Fixing old structure" msg_info "Fixing old structure"
$STD apt install -y musl-dev $STD apt install -y musl-dev
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
cp /opt/homarr/.env /opt/homarr.env
echo "REDIS_IS_EXTERNAL='true'" >> /opt/homarr.env echo "REDIS_IS_EXTERNAL='true'" >> /opt/homarr.env
sed -i 's|^ExecStart=.*|ExecStart=/opt/homarr/run.sh|' /etc/systemd/system/homarr.service 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 sed -i 's|^EnvironmentFile=.*|EnvironmentFile=-/opt/homarr.env|' /etc/systemd/system/homarr.service
@ -52,7 +53,6 @@ ReadWritePaths=-/appdata/redis -/var/lib/redis -/var/log/redis -/var/run/redis -
EOF EOF
# TODO: change in json # TODO: change in json
systemctl daemon-reload systemctl daemon-reload
cp /opt/homarr/.env /opt/homarr.env
rm /opt/run_homarr.sh rm /opt/run_homarr.sh
msg_ok "Fixed old structure" msg_ok "Fixed old structure"
fi fi
@ -64,18 +64,14 @@ EOF
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]') NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
setup_nodejs setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-amd64.tar.gz"
rm -rf /opt/homarr msg_info "Updating Homarr"
fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-amd64.tar.gz"
msg_info "Updating Homarr to v${RELEASE}"
cp /opt/homarr/redis.conf /etc/redis/redis.conf cp /opt/homarr/redis.conf /etc/redis/redis.conf
rm /etc/nginx/nginx.conf rm /etc/nginx/nginx.conf
mkdir -p /etc/nginx/templates mkdir -p /etc/nginx/templates
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' >/usr/bin/homarr msg_ok "Updated Homarr"
chmod +x /usr/bin/homarr
msg_ok "Updated Homarr to v${RELEASE}"
msg_info "Starting Services" msg_info "Starting Services"
chmod +x /opt/homarr/run.sh chmod +x /opt/homarr/run.sh