From 600c2f6061beb99bb6a1b39bc9bd59ff1891078a Mon Sep 17 00:00:00 2001 From: MacRimi Date: Mon, 6 Oct 2025 12:09:43 +0200 Subject: [PATCH] Update AppImagen --- AppImage/scripts/AppRun | 24 +++++++------------ AppImage/scripts/build_appimage.sh | 38 ++++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/AppImage/scripts/AppRun b/AppImage/scripts/AppRun index e075d03..e163945 100644 --- a/AppImage/scripts/AppRun +++ b/AppImage/scripts/AppRun @@ -7,27 +7,12 @@ APPDIR="$(dirname "$(readlink -f "${0}")")" export PATH="${APPDIR}/usr/bin:${PATH}" -export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}" +export LD_LIBRARY_PATH="${APPDIR}/usr/lib/x86_64-linux-gnu:${APPDIR}/usr/lib:${LD_LIBRARY_PATH}" export PYTHONPATH="${APPDIR}/usr/lib/python3/dist-packages:${APPDIR}/usr/lib/python3/site-packages:${PYTHONPATH}" # Change to the AppImage directory cd "${APPDIR}" -# Debug: Print directory structure for troubleshooting -echo "[v0] AppImage mounted at: ${APPDIR}" -echo "[v0] Contents of AppImage root:" -ls -la "${APPDIR}/" || echo "[v0] Cannot list AppImage root" - -echo "[v0] Contents of web directory:" -ls -la "${APPDIR}/web/" || echo "[v0] Web directory not found" - -echo "[v0] Looking for index.html:" -find "${APPDIR}" -name "index.html" -type f || echo "[v0] No index.html found" - -echo "[v0] Python path: ${PYTHONPATH}" -echo "[v0] Checking Flask installation:" -python3 -c "import flask; print('Flask version:', flask.__version__)" 2>/dev/null || echo "[v0] Flask not found" - # Check for translation argument if [[ "$1" == "--translate" ]]; then echo "🌐 Starting ProxMenux Translation Service..." @@ -37,6 +22,13 @@ else echo "📊 Dashboard will be available at: http://localhost:8008" echo "🔌 API endpoints at: http://localhost:8008/api/" echo "" + + echo "🔧 Hardware monitoring tools:" + [ -x "${APPDIR}/usr/bin/ipmitool" ] && echo " ✅ ipmitool available" || echo " ⚠️ ipmitool not available" + [ -x "${APPDIR}/usr/bin/sensors" ] && echo " ✅ sensors available" || echo " ⚠️ sensors not available" + [ -x "${APPDIR}/usr/bin/upsc" ] && echo " ✅ upsc available" || echo " ⚠️ upsc not available" + echo "" + echo "Press Ctrl+C to stop the server" echo "" diff --git a/AppImage/scripts/build_appimage.sh b/AppImage/scripts/build_appimage.sh index 4bdce0b..7eb5cd2 100644 --- a/AppImage/scripts/build_appimage.sh +++ b/AppImage/scripts/build_appimage.sh @@ -349,7 +349,8 @@ download_deb() { } # Try to download packages (non-fatal if they fail) -download_deb "http://deb.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-4_amd64.deb" "ipmitool.deb" "ipmitool" || true +download_deb "http://deb.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-4+deb12u2_amd64.deb" "ipmitool.deb" "ipmitool" || true +download_deb "http://deb.debian.org/debian/pool/main/f/freeipmi/libfreeipmi17_1.6.10-3_amd64.deb" "libfreeipmi17.deb" "libfreeipmi17" || true download_deb "http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0-7.1_amd64.deb" "lm-sensors.deb" "lm-sensors" || true download_deb "http://deb.debian.org/debian/pool/main/n/nut/nut-client_2.8.0-7_amd64.deb" "nut-client.deb" "nut-client" || true download_deb "http://deb.debian.org/debian/pool/main/n/nut/libupsclient6_2.8.0-7_amd64.deb" "libupsclient6.deb" "libupsclient6" || true @@ -371,21 +372,50 @@ else echo "✅ Extracted $extracted_count package(s)" # Copy binaries to AppDir + echo "📋 Copying monitoring tools to AppDir..." + + # Copy from usr/bin if [ -d "$WORK_DIR/extracted/usr/bin" ]; then - echo "📋 Copying monitoring tools to AppDir..." cp -r "$WORK_DIR/extracted/usr/bin"/* "$APP_DIR/usr/bin/" 2>/dev/null || true fi - + + # Copy from usr/sbin if [ -d "$WORK_DIR/extracted/usr/sbin" ]; then cp -r "$WORK_DIR/extracted/usr/sbin"/* "$APP_DIR/usr/bin/" 2>/dev/null || true fi - + + if [ -d "$WORK_DIR/extracted/bin" ]; then + echo " Moving binaries from /bin to usr/bin..." + cp -r "$WORK_DIR/extracted/bin"/* "$APP_DIR/usr/bin/" 2>/dev/null || true + fi + if [ -d "$WORK_DIR/extracted/usr/lib" ]; then mkdir -p "$APP_DIR/usr/lib" cp -r "$WORK_DIR/extracted/usr/lib"/* "$APP_DIR/usr/lib/" 2>/dev/null || true fi + if [ -d "$WORK_DIR/extracted/lib" ]; then + mkdir -p "$APP_DIR/usr/lib" + cp -r "$WORK_DIR/extracted/lib"/* "$APP_DIR/usr/lib/" 2>/dev/null || true + fi + + if [ -d "$APP_DIR/usr/lib/x86_64-linux-gnu" ]; then + echo " Creating library symlinks..." + # Link libupsclient + if [ -f "$APP_DIR/usr/lib/x86_64-linux-gnu/libupsclient.so.6" ]; then + ln -sf "$APP_DIR/usr/lib/x86_64-linux-gnu/libupsclient.so.6" "$APP_DIR/usr/lib/libupsclient.so.6" 2>/dev/null || true + fi + # Link libfreeipmi + if [ -f "$APP_DIR/usr/lib/x86_64-linux-gnu/libfreeipmi.so.17" ]; then + ln -sf "$APP_DIR/usr/lib/x86_64-linux-gnu/libfreeipmi.so.17" "$APP_DIR/usr/lib/libfreeipmi.so.17" 2>/dev/null || true + fi + fi + echo "✅ Hardware monitoring tools installed successfully" + echo "📋 Installed tools:" + [ -f "$APP_DIR/usr/bin/ipmitool" ] && echo " ✅ ipmitool" || echo " ⚠️ ipmitool not found" + [ -f "$APP_DIR/usr/bin/sensors" ] && echo " ✅ sensors (lm-sensors)" || echo " ⚠️ sensors not found" + [ -f "$APP_DIR/usr/bin/upsc" ] && echo " ✅ upsc (nut-client)" || echo " ⚠️ upsc not found" fi # Build AppImage