fix(librenms): replace broken git-based update with tarball approach

- update_script in ct/librenms.sh: remove broken git init/daily.sh pattern;
  replace with check_for_gh_release + fetch_and_deploy_gh_release (tarball),
  preserving .env, config.php and rrd/ data across updates, then running
  composer install, artisan optimize:clear and artisan migrate
- install/librenms-install.sh: remove redundant git init block that tried to
  layer git metadata on top of an already-deployed tarball, which caused
  daily.sh to misbehave on subsequent updates
This commit is contained in:
MickLesk
2026-06-24 21:48:55 +02:00
parent f71005cc48
commit c3ab332793
2 changed files with 39 additions and 27 deletions
-10
View File
@@ -65,16 +65,6 @@ EOF
chown -R librenms:librenms /opt/librenms
chmod 771 /opt/librenms
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
if [[ ! -d /opt/librenms/.git ]]; then
LIBRENMS_VERSION=$(cat ~/.librenms 2>/dev/null)
cd /opt/librenms
git init -q
git remote add origin https://github.com/librenms/librenms.git
git fetch --depth 1 origin "refs/tags/v${LIBRENMS_VERSION}" 2>/dev/null ||
git fetch --depth 1 origin "refs/tags/${LIBRENMS_VERSION}" 2>/dev/null || true
git checkout -qf FETCH_HEAD 2>/dev/null || true
chown -R librenms:librenms .git
fi
msg_ok "Configured LibreNMS"
msg_info "Configure MariaDB"