Optimize desktop launcher for silent startup and restore server URL detection
This commit is contained in:
parent
c9fc389d94
commit
19f6726a33
18
launch_qt.sh
18
launch_qt.sh
|
|
@ -101,10 +101,6 @@ if [ $MISSING_DEPS -eq 1 ]; then
|
||||||
echo "✅ Dependencies installed successfully!"
|
echo "✅ Dependencies installed successfully!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if Flask server is running
|
|
||||||
echo ""
|
|
||||||
echo "Checking Flask server..."
|
|
||||||
|
|
||||||
# Try to read server URL from settings
|
# Try to read server URL from settings
|
||||||
SERVER_URL="http://localhost:5000"
|
SERVER_URL="http://localhost:5000"
|
||||||
SETTINGS_FILE="$HOME/.techdj_settings.json"
|
SETTINGS_FILE="$HOME/.techdj_settings.json"
|
||||||
|
|
@ -125,27 +121,25 @@ if [ -f "$SETTINGS_FILE" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if Flask server is running
|
||||||
echo "Checking server at: $SERVER_URL"
|
echo "Checking server at: $SERVER_URL"
|
||||||
|
|
||||||
if curl -s --max-time 5 "${SERVER_URL}/library.json" > /dev/null 2>&1; then
|
if curl -s --max-time 2 "${SERVER_URL}/library.json" > /dev/null 2>&1; then
|
||||||
echo "✅ Flask server is running at $SERVER_URL"
|
echo "✅ Flask server is running at $SERVER_URL"
|
||||||
else
|
else
|
||||||
echo "⚠️ Flask server not detected at $SERVER_URL"
|
echo "⚠️ Flask server not detected at $SERVER_URL"
|
||||||
|
if [[ "$*" == *"--noint"* ]]; then
|
||||||
|
echo "Proceeding in non-interactive mode..."
|
||||||
|
else
|
||||||
echo "Please make sure the server is running."
|
echo "Please make sure the server is running."
|
||||||
echo ""
|
echo ""
|
||||||
echo "For local server:"
|
|
||||||
echo " python3 server.py"
|
|
||||||
echo ""
|
|
||||||
echo "For remote server:"
|
|
||||||
echo " Make sure server.py is running on the remote machine"
|
|
||||||
echo " and the URL in Settings (⚙️) is correct."
|
|
||||||
echo ""
|
|
||||||
read -p "Continue anyway? (y/n) " -n 1 -r
|
read -p "Continue anyway? (y/n) " -n 1 -r
|
||||||
echo
|
echo
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Launch the application
|
# Launch the application
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue