Files
ProxMenux/AppImage/scripts/AppRun

46 lines
1.9 KiB
Plaintext
Raw Normal View History

2025-09-29 18:58:53 +02:00
#!/bin/bash
# ProxMenux Monitor AppImage Entry Point
# This script is executed when the AppImage is run
# Get the directory where this AppImage is mounted
APPDIR="$(dirname "$(readlink -f "${0}")")"
export PATH="${APPDIR}/usr/bin:${PATH}"
2025-10-06 13:48:02 +02:00
export LD_LIBRARY_PATH="${APPDIR}/usr/lib/x86_64-linux-gnu:${APPDIR}/usr/lib:${APPDIR}/lib/x86_64-linux-gnu:${APPDIR}/lib:${LD_LIBRARY_PATH}"
2025-09-29 19:12:56 +02:00
export PYTHONPATH="${APPDIR}/usr/lib/python3/dist-packages:${APPDIR}/usr/lib/python3/site-packages:${PYTHONPATH}"
2025-09-29 18:58:53 +02:00
# Change to the AppImage directory
cd "${APPDIR}"
# Check for translation argument
if [[ "$1" == "--translate" ]]; then
echo "🌐 Starting ProxMenux Translation Service..."
2025-09-29 19:07:35 +02:00
exec python3 "${APPDIR}/usr/bin/translate_cli.py" "${@:2}"
2025-09-29 18:58:53 +02:00
else
echo "🚀 Starting ProxMenux Monitor Dashboard..."
echo "📊 Dashboard will be available at: http://localhost:8008"
echo "🔌 API endpoints at: http://localhost:8008/api/"
echo ""
2025-10-06 12:09:43 +02:00
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"
2025-10-06 13:48:02 +02:00
if [ -x "${APPDIR}/usr/bin/ipmitool" ]; then
if ldd "${APPDIR}/usr/bin/ipmitool" 2>/dev/null | grep -q "libfreeipmi.so.17 => not found"; then
echo " ⚠️ libfreeipmi.so.17 not found - ipmitool may not work"
elif ldd "${APPDIR}/usr/bin/ipmitool" 2>/dev/null | grep -q "libfreeipmi.so.17"; then
echo " ✅ libfreeipmi.so.17 loaded successfully"
fi
fi
echo ""
2025-09-29 18:58:53 +02:00
echo "Press Ctrl+C to stop the server"
echo ""
# Start the Flask server
2025-09-29 19:07:35 +02:00
exec python3 "${APPDIR}/usr/bin/flask_server.py"
2025-09-29 18:58:53 +02:00
fi